今天遇到一个问题,在jenkins中发布job的时候报错stderr: error: RPC failed; result=22, HTTP code = 404,我以为是git的权限不够,看下面的报错信息。
19:36:41 > git fetch --tags --progress https://git.wulaoer.org/service +refs/heads/*:refs/remotes/origin/* # timeout=10 19:36:42 ERROR: Error cloning remote repo 'origin' 19:36:42 hudson.plugins.git.GitException: Command "git fetch --tags --progress https://git.wulaoer.org/service +refs/heads/*:refs/remotes/origin/*" returned status code 128: 19:36:42 stdout: 19:36:42 stderr: error: RPC failed; result=22, HTTP code = 404 19:36:42 fatal: The remote end hung up unexpectedly 19:36:42 19:36:42 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2661) 19:36:42 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2086) 19:36:42 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:86) 19:36:42 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:608) 19:36:42 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:837) 19:36:42 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1223) 19:36:42 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1301) 19:36:42 at hudson.scm.SCM.checkout(SCM.java:505) 19:36:42 at hudson.model.AbstractProject.checkout(AbstractProject.java:1211) 19:36:42 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:636) 19:36:42 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 19:36:42 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:508) 19:36:42 at hudson.model.Run.execute(Run.java:1906) 19:36:42 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 19:36:42 at hudson.model.ResourceController.execute(ResourceController.java:97) 19:36:42 at hudson.model.Executor.run(Executor.java:429) 19:36:42 ERROR: Error cloning remote repo 'origin' 19:36:42 Finished: FAILURE
所以看一下配置,后来发现job的日志中git地址地址不对,因为http拉取代码时最后是.git,然后我就找到git的地址信息重新替换里一下,发现可以了。
您可以选择一种方式赞助本站
支付宝扫一扫赞助
微信钱包扫描赞助
赏