Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins not recognizing git binary

I have installed git successfully on Centos 5.7,

$ git --version git version 1.7.4.1

While pulling the source from the github from jenkins, i am facing following issue

Caused by: java.io.IOException: Cannot run program "git": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
at hudson.Launcher$ProcStarter.start(Launcher.java:338)
at hudson.Launcher$ProcStarter.join(Launcher.java:345)
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:774)

Jenkins not recognizing git binary.

please help me on this

like image 438
sathya Avatar asked Jun 20 '12 15:06

sathya


2 Answers

You can also override the git path on a per-node basis. Just go to the configure page of your node, and check Tool Locations, and provide the git path on that system.

Here on OSX, it was /usr/local/git/bin/git for me. You can determine it by executing which git as jenkins user on your node.

like image 168
fabb Avatar answered Oct 21 '22 13:10

fabb


Jenkins needs to know where your git binary file is installed; this is usually at /usr/bin/git on Linux systems. Go to the /configure page of your Jenkins installation (the "Manage Jenkins" link) and set it up in the "Git" section.

like image 43
gareth_bowles Avatar answered Oct 21 '22 11:10

gareth_bowles