In my teamcity it is working fine When I use the VCS checkout mode from the server
But when I use the build agent it is not working when I run a build it says (failed in
applying the patch and it says Cannot connect to the X server) . My build agent is a
Linux machine . Here I run my build agent . I configured build agent for generating the
War files which is working fine . But I choose to VCS check out mode at the teamcity
Version Control settings and run the build I am getting this error (Cannot connect to the
p4 (perforce) :bin X server)
What I tried so far : I configured the P4 command line client which is running fine when I
say p4 . It is able to recognize it . But when I do it from the teamcity I get this
Error saying (cannot connect to the p4: bin x server) . I am new to teamcity and perforce
Am I missing any steps that require for the configuring p4 at the build agent ? Can anyone
mention the steps that are require to configure if so ?
I resolved it myself :P
Simple thing ,Make sure your p4 is in usr/local/bin and try running with
-> p4 -u shared -p client:port users | more
The above command should fetch you all the users from the perforce server
The important information for configuring the p4 client is: P4PORT, P4USER, and P4CLIENT.
This information is generally set via environment variables, but can also be set via command-line flags.
The first thing you should do is figure out whether your tool is using environment variables or command line flags to perform the configuration.
Then run 'p4 set' and 'p4 info' at the command line to see what configuration values you are using successfully at the command line, and review the tool's settings to ensure they are identical.