Reputation: 25
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
Upvotes: 0
Views: 592
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
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