Reputation: 2323
when i build my jenkins project i want to pull it first from my git repository so the code is up to date, i can see git status
and git --version
normally, but when it come to git pull
the console output stuck on loading like this:
When i try the exact same command and same dir in command prompt i can pull successfully in less than 2 seconds
is there anything that make different between jenkins command and cmd command? i use windows xp with ssh to authenticating with git repository.
Upvotes: 3
Views: 3265
Reputation: 1323115
If ssh
is used, it is crucial to make sure HOME
is set when the job is executed: ssh
will look for id_rsa
and id_rsa.pub
(private and public keys) under %HOME%\.ssh
.
In doubt, one can use the EnvInject plugin which will add environment variables for a given job.
Upvotes: 2