Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"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.

Error:

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

Any ideas? Thanks.

like image 976
micdoodle8 Avatar asked Oct 01 '12 21:10

micdoodle8


People also ask

Can we use GitHub plugin in Jenkins?

This plugin integrates Jenkins with Github projects. The plugin currently has three major functionalities: Create hyperlinks between your Jenkins projects and GitHub. Trigger a job when you push to the repository by groking HTTP POSTs from post-receive hook and optionally auto-managing the hook setup.

What is repository URL in Jenkins?

Under the Git section, in the Repositories section, you'll see the following: Repository URL: This will be the URL of your remote repository. The syntax is same as what you'll specify in the git command line. For example: username@git-server-ip:/git/repository/full/path.


1 Answers

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 
like image 125
ngm Avatar answered Sep 28 '22 04:09

ngm