Nash
Nash

Reputation: 25

Jenkins GIT Repo URL Error

 Failed to connect to repository : Error performing command: C:\Program
 Files\Git\bin ls-remote -h ssh://git@localhost:7999/sam/bo.git HEAD

Facing above error when trying to integrate GIT with Jenkins. Please see the screen shot of below error.

Jenkins GIT URL Repo Issue

enter image description here

Upvotes: 0

Views: 592

Answers (2)

ravi creed
ravi creed

Reputation: 401

As you can see the command is not properly started, You have to set the path of git.exe properly so that the command should contain complete path of git.exe(inclusive of git.exe)

Your Command is, C:\Program Files\Git\bin ls-remote -h ssh://git@localhost:7999/sam/bo.git HEAD

You have to set the path of your git.exe(git.exe inclusive) in Manage Jenkins>Global Tool Configuration>Path to Git executable and set path as "C:\Program Files\Git\bin\git.exe"

Once you set the path it would look like C:\Program Files\Git\bin\git.exe ls-remote -h ssh://git@localhost:7999/sam/bo.git HEAD

Once this is done, you can check for https link or ssh link and check for credential as answered above.

Upvotes: 0

Jenish Patel
Jenish Patel

Reputation: 154

In you question you have used C:\. Your git path must start with https://

You haven't set the credential for GIT, Create it and set in the credential box of jenkins.

Upvotes: 1

Related Questions