I have a Jenkins job which does git push at the end. There are 3 nodes - a master and 2 slaves. The job completes successfully when the option to Restrict running the job on a specific node is set. The job fails if that option is unset. Error message is as follows:
> git push git@GIT-SERVER:PROJECT/KBC.git refs/heads/master --tags # timeout=10
Failure in post build SCM action: Command "git push git@GIT-SERVER refs/heads/master --tags" returned status code 1:
stdout:
stderr: Warning: No xauth data; using fake authentication data for X11 forwarding.
X11 forwarding request failed on channel 0
I tried updating the ~/.ssh/config with the following entries however it didn't help and I got the same error.
Host *
ForwardAgent yes
ForwardX11 yes
XAuthLocation /usr/bin/xauth
I also tried adding below entry but it failed with the bad config error:
X11UseLocalhost no