詹金斯挂在git fetch上 [英] Jenkins hangs at git fetch
问题描述
我是Jenkins的新手,我试图让它在我的.NET项目中运行一些单元测试。
当我运行一个构建时,它会挂起尝试从git仓库中获取。
错误:10分钟后超时
C:\ Program Files \Git\cmd\git.exe config --local --remove-section credential#timeout = 10
错误:获取远程repo'origin'出错
hudson .plugins.git.GitException:无法从 https://github.com/name.of.repo
我已经生成了已知的主机并将.ssh目录复制到了C:\ Windows \SysWOW64\ config \ systemprofile.ssh根据jenkins指令在 https://wiki.jenkins Jenkins,GIT插件和Windows下的-ci.org/display/JENKINS/Git+Plugin
我跑了s sh git@github.com从cmd行,我可以成功验证。
有什么想法吗?
感谢:)
这可能是防火墙问题。
您可以使用SSH(端口22)向Github进行身份验证,以便路由正常工作。
您的工作是尝试通过 https://github.com (端口443)访问github,其中超时。
通过将存储库URL更改为 git@github.com:account / repository.git
来尝试访问github,您可以在主页上找到此URL回购,下拉菜单'选择克隆网址',选项'SSH'。
I'm a newbie with Jenkins and Im trying to get it to run some unit tests in my.NET project.
When I run a build it hangs when trying to fetch from the git repository.
ERROR: Timeout after 10 minutes
C:\Program Files\Git\cmd\git.exe config --local --remove-section credential # timeout=10 ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from https://github.com/name.of.repo
I've generated the known hosts and copied the .ssh dir to C:\Windows\SysWOW64\config\systemprofile.ssh as per the jenkins instructions at https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin under "Jenkins, GIT plugin and Windows"
I ran ssh git@github.com from the cmd line and I can succesfully authenticate.
Any ideas please?
Thanks :)
This is probably a firewall issue.
You can authenticate to Github using SSH (port 22), so that route is working.
Your job however is trying to access github via https://github.com (port 443) which timeouts.
Try accessing github over ssh by changing the repository url to git@github.com:account/repository.git
(you can find this URL on the main page of the repo, dropdown 'Choose a clone URL', option 'SSH'.
这篇关于詹金斯挂在git fetch上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!