Jenkins-github存储库错误(windows) [英] Jenkins-github repository error (windows)

查看:278
本文介绍了Jenkins-github存储库错误(windows)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jenkins的github。
我能够成功克隆github存储库,但是当我在Jenkins中添加存储库的URL时,出现以下错误:

 无法连接到资源库:执行命令时出错:C:\ Users \ username\Documents\GitHub ls-remote -h git@github.com:username / game-of-life.git HEAD 

网址为:git@github.com:username / game-of-life.git



我已经在jenkins主配置中添加了github的路径,即:

lockquote
:\Users\username\Documents\GitHub


我尝试了其他解决方案,例如为github和jenkins生成ssh密钥。



对这个错误有什么想法?
Thanks。

解决方案

在Jenkins系统配置中,添加git.exe文件的路径。
在我的情况下,在

中的git.exe


C:\Users\username\AppData\Local\ GitHub \PortableGit_some#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \gitk.cmd工作正常。


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:\Users\username\Documents\GitHub 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:\Users\username\Documents\GitHub

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

Any idea about this error? Thanks.

解决方案

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

C:\Users\username\AppData\Local\GitHub\PortableGit_some#\bin\git.exe

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

这篇关于Jenkins-github存储库错误(windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆