micdoodle8 micdoodle8 - 1 month ago 8x
Git Question

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

I am getting an error when inputting my repo location into the "Source Code Management > Git > Repository URL" section of a new Job. I have searched all around and tried many different URLs with no success.


Failed to connect to repository : Error performing command: git ls-remote -h https://github.com/micdoodle8/Crossbow_Mod_2.git HEAD

Any ideas? Thanks.

ngm ngm

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