Jenkins doesn't recognize git binary

I installed git successfully on Centos 5.7,

$ git - git version 1.7.4.1

Pulling the source from jenkins github, I ran into the following problem

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 does not recognize the git binary.

Please help me with this.

+6
source share
2 answers

You can also override git path based on node. Just go to the configuration page of your node and check Tool Locations and specify the git path on this system.

Here for OSX it was /usr/local/git/bin/git for me. You can define it by running which git as the jenkins user on node.

+4
source

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

+1
source

Source: https://habr.com/ru/post/918578/


All Articles