Child pages
  • Getting error Connection failed! upon testing connection to Perforce VCS Root from TeamCity running as a Windows service using SYSTEM account
Skip to end of metadata
Go to start of metadata


If Perforce server uses SSL-encrypted connection, adding a Perforce VCS Root on a Windows-based TeamCity server running as a services using SYSTEM account may result in the error below.

Connection failed!

p4 error: "The authenticity of '' can't be established,
this may be your first attempt to connect to this P4PORT.
The fingerprint for the key sent to your client is
To allow connection use the 'p4 trust' command." - while running "p4 -u Anatoly.Cherenkov -p ssl: stream -o -v //mydepot/perforceLinuxMain"


The account used to start TeamCity service does not have the Perforce server's SSL certificate fingerprint in its p4trust.txt file. The error might persist even after you use p4 trust command if TeamCity is using a different account from the one using which the command is run.


Add the perforce port and SSL fingerprint into p4trust.txt file under the %USERPROFILE% folder of TeamCity account. File content example:**++**:E5:99:F1:14:42:4E:AC:B5:BD:ED:4E:26:F2:81:A8:68:EF:33:3C:3C

If SYSTEM account is used to start TeamCity service, the %USERPROFILE% folder is C:\Windows\System32\config\systemprofile.

  • No labels