How to connect & perform Sync with Perforce on Mac

拟墨画扇 提交于 2019-12-05 19:32:31

In addition to downloading the 'p4' executable and placing it in your path (which you have already done), you need to set three configuration settings:

  1. P4PORT, which is the network address of your Perforce server
  2. P4USER, which is your user name that you will use to connect to Perforce
  3. P4CLIENT, which is the name of the workspace that you use on this workstation

You have already figured these out in P4V, as part of entering the data in the connection dialog. But you need to set these variables separately for the command line to know about them.

For example, I might do:

  1. p4 set P4PORT=myserver.example.com:1666
  2. p4 set P4USER=bryan
  3. p4 set P4CLIENT=bryan-dev

and then I would be able to connect with the command line to my Perforce server.

Instead of 'p4 set', you can also use 'export' in your shell:

  1. export P4PORT=myserver.example.com:1666
  2. export P4USER=bryan
  3. export P4CLIENT=bryan-dev

Or you can use a P4CONFIG file.

Bottom line: set P4PORT, P4USER, and P4CLIENT to match the settings that you use in your P4V connection dialog, and the command line will be ready to go.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!