Jenkins giving error while cloning from gitHub Jenkins giving error while cloning from gitHub jenkins jenkins

Jenkins giving error while cloning from gitHub


I encountered and fixed the same problem :)

There are two way to configure the path of git:

  1. On Jenkins Master

    a. Enter Jenkins System Configure (Jenkins -> Manage Jenkins -> Configure System )

    b. Find the Git item and Configure the git installation (specify the git path on Jenkins Master)

  2. On Jenkins Slave

    a. Enter Jenkins Slave's Configure

    b. Check the "Tool Locations" Checkbox and specify the path of git on the Jenkins Slave.

In my situation, I don't have the privilege to access the Jenkins Master. So I install the git on the Jenkins Slave and add it to Jenkins Slave's Configure.


This seems to be a bug, see JENKINS-16523 where I posted a workaround.


I went through the same issue.

I noticed the mixture of git configuration in individual jobs "/var/lib/jenkins/jobs/job_name/config.xml":

[root@jenkins.example.com jobs]# find . -maxdepth 2 -name     config.xml|xargs grep '<gitTool>'./job1/config.xml:    <gitTool>git</gitTool>./job2/config.xml:    <gitTool>Default</gitTool>./job3/config.xml:    <gitTool>git</gitTool>./job4/config.xml:    <gitTool>Default</gitTool>

So I fixed the name of gitTool and restarted the Jenkins. It looks like the git configuration doesn't properly and the change of git is not propagated to all jobs.

Also be aware that the git configuration can differ in .xml file with configuration and the configuration in webface of the Jenkins!!!