Start up the command line client and verify the connection to the server

  1. Start up the command line client:

    $ p4

  2. To verify a connection, issue the p4 info command. If P4PORT is set correctly, information like the following is displayed:

    User name: bruno Client name: bruno_ws Client host: computer_12 Client root: c:\bruno_ws Current directory: c:\bruno_ws Peer address; 10.0.102.24:61122 Client address: 10.0.0.196 Server address: ssl:example.com:1818 Server root: /usr/depot/p4d Server date: 2012/03/28 15:03:05 -0700 PDT Server uptime: 752:41:33 Server version: P4D/FREEBSD/2012.1/406375 (2012/01/25) ServerID: Master Server license: P4Admin <p4adm> 20 users (expires 2015/01/01) Server license-ip: 10.0.0.2 Case handling: sensitive

    The Server address: field shows the host to which p4 connected and also displays the host and port number on which the Helix Server is listening. If P4PORT is set incorrectly, you receive a message like the following:

    Perforce client error: Connect to server failed; check $P4PORT. TCP connect to perforce:1666 failed. perforce: host unknown.

  3. If the value you see in the third line of the error message is perforce:1666 (as above), P4PORT has not been set. Set P4PORT and try to connect again.
  4. If your installation requires SSL, make sure your P4PORT is of the form ssl:hostname:port.
  5. You will be asked to verify the server’s fingerprint the first time you attempt to connect to the server. If the fingerprint is accurate, use the p4 trust command to install the fingerprint into a file (pointed to by the P4TRUST environment variable) that holds a list of known/trusted Helix Server and their respective fingerprints. If P4TRUST is unset, this file is .p4trust in the user’s home directory. For more information, see SSL-encrypted connections.
  6. If your installation requires plain text (in order to support older Helix Server applications), set P4PORT to tcp:hostname:port.