"Failed to connect to repository" Error while setting up Github Jenkins Plugin "Failed to connect to repository" Error while setting up Github Jenkins Plugin jenkins jenkins

"Failed to connect to repository" Error while setting up Github Jenkins Plugin


You might need to set the path to your git executable in Manage Jenkins -> Configure System -> Git -> Git Installations -> Path to Git executable.

For example, I was getting the same error in Windows. I had installed git with chocolatey, and got the location via Powershell:

Get-Command git.exe | Select Definition

In Unix, you should be able to do:

which git


on Jenkins ver. 2.7.4, the setting property of (Path to Git executable) is now in Manage Jenkins -> Global Tool Configuration -> Git -> Git Installations -> Path to Git executable.


I was getting the same thing while connection to git from jenkins. Here is few checklist you would like to watch on :-

Jenkins Configuration :-
1) Check whether git executable is appropriately specified
2) Provide SSH repository link git@blahblah
3) Under credentials >> Select Username and Authentication key(go to your server, Generate SSH keys ssh-keygen... Copy keys to JENKINS_HOME/,ssh)
You should be able to connect to your GIT repository from Jenkins