错误:无法从任何存储库(git和Jenkins)获取

时间:2013-03-16 09:28:20

标签: git jenkins

在使用Git-plugin(1.3.0)的Jenkins(1.504)上,我们经常从git repo中获取此错误

    hudson.plugins.git.GitException: Command "C:\Program Files (x86)\Git\bin\git.exe fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 128:
    stdout: 
    stderr: error: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure while accessing https://user:password@git.internal.com/scm/projet/project.git/info/refs?service=git-upload-pack
    fatal: HTTP request failed

        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:772)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:772)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:738)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:159)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
    at hudson.plugins.git.GitSCM.access$000(GitSCM.java:57)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:976)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:941)
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
    at hudson.remoting.UserRequest.perform(UserRequest.java:118)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:326)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at hudson.remoting.Engine$1$1.run(Engine.java:58)
    at java.lang.Thread.run(Unknown Source)
ERROR: Could not fetch from any repository

另一种变体:

stderr: error: The requested URL returned error: 400 while accessing https://user:password@git.internal.com/scm/projet/project.git/info/refs
fatal: HTTP request failed

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:772)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:738)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:159)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
    at hudson.plugins.git.GitSCM.access$000(GitSCM.java:57)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:976)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:941)
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
    at hudson.remoting.UserRequest.perform(UserRequest.java:118)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:326)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
ERROR: Could not fetch from any repository

通常只需要重新启动作业然后就可以了。但是,不是手动重新启动作业,而是找到解决方案。

1 个答案:

答案 0 :(得分:2)

单击作业配置页面上的“高级项目选项”。您将看到一个选项“重试计数”。勾选此框并输入结账失败时要重试的次数。

正如评论者建议的那样,您还应该首先调查结帐有时会失败的原因。即使你配置了大量的重试,如果根本问题没有解决,它们仍然可能会失败。