Teamcity build agent VCS checkout mode , it says c

2019-09-01 05:34发布

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 ?

2条回答
Rolldiameter
2楼-- · 2019-09-01 05:55

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

查看更多
冷血范
3楼-- · 2019-09-01 06:11

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.

查看更多
登录 后发表回答