Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am using github with jenkins. I was able to successfully clone the github repository but when I add the URL of repository in Jenkins, I am getting following error:

Failed to connect to repository : Error performing command: C:UsersusernameDocumentsGitHub ls-remote -h git@github.com:username/game-of-life.git HEAD

The URL is: git@github.com:username/game-of-life.git

I have added the path of github in jenkins main configuration, which is:

C:UsersusernameDocumentsGitHub

I have tried other solutions such as generating ssh keys for github and jenkins.

Any idea about this error? Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
234 views
Welcome To Ask or Share your Answers For Others

1 Answer

In Jenkins system configuration, add the path of git.exe file. In my case, git.exe in

C:UsersusernameAppDataLocalGitHubPortableGit_some#ingit.exe

did not work but "gitk.cmd" in ...cmdgitk.cmd worked fine.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...