我在 Windows 7 下使用 Jenkins 1.484,我在克隆 git 存储库时遇到了麻烦。
我已经正确配置了 Git,但是当我尝试克隆存储库时,这需要很长时间并且永远不会成功。它在以下情况下停止:
git --version git 版本 1.7.9.msysgit.0
如果十分钟后我确实停止了构建,这就是我所看到的:
ERROR: Error cloning remote repo 'origin' : Could not clone git@github.com:GBSA/Gottware-server.git
hudson.plugins.git.GitException: Could not clone git@github.com:GBSA/Gottware-server.git
at hudson.plugins.git.GitAPI.clone(GitAPI.java:271)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1040)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:982)
at hudson.FilePath.act(FilePath.java:851)
at hudson.FilePath.act(FilePath.java:824)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:982)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1138)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
at hudson.model.Run.execute(Run.java:1502)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Caused by: hudson.plugins.git.GitException: Error performing command: C:\Program Files (x86)\Git\bin\git.exe clone --progress -o origin git@github.com:GBSA/Gottware-server.git G:\jenkins\workspaces\gottwareproductiontests
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:870)
at hudson.plugins.git.GitAPI.access$000(GitAPI.java:40)
at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:267)
at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:246)
at hudson.FilePath.act(FilePath.java:851)
at hudson.FilePath.act(FilePath.java:824)
at hudson.plugins.git.GitAPI.clone(GitAPI.java:246)
... 14 more
Caused by: java.lang.InterruptedException
at java.lang.ProcessImpl.waitFor(Native Method)
at hudson.Proc$LocalProc.join(Proc.java:319)
at hudson.Launcher$ProcStarter.join(Launcher.java:352)
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:851)
... 20 more
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1052)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:982)
at hudson.FilePath.act(FilePath.java:851)
相反,如果我尝试执行从命令行配置的相同 GIT,则克隆成功
C:\Program Files (x86)\Git\bin>"C:\Program Files (x86)\Git\bin\git.exe" clone --progress -o origin git@github.com:GBSA/Gottware-server.git G:\jenkins\
workspaces\gottwareproductiontests
Cloning into 'G:\jenkins\workspaces\gottwareproductiontests'...
remote: Counting objects: 38007, done.
remote: Compressing objects: 100% (16268/16268), done.
出了什么问题?