3

在使用 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

通常它只是重新启动工作的问题,然后它就可以正常工作了。但是,与其手动重新启动作业,不如找到解决方案。

4

1 回答 1

2

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

正如评论者所建议的那样,您还应该首先调查为什么结帐有时会失败。即使您配置了大量的重试,如果底层问题没有得到解决,所有重试仍然可能会失败。

于 2013-03-22T15:11:34.757 回答