👋 欢迎来到吴老二技术博客,专注运维 / 数据库 / 云原生
首页/DevOps/正文

jenkins中job报错stderr: error: RPC failed; result=22, HTTP code = 404

吴
吴老二
2022-07-21DevOps2115 次浏览0 条评论
今天遇到一个问题,在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的地址信息重新替换里一下,发现可以了。
文章底部广告位在后台「广告设置」填写广告代码后显示

评论 0

评论需 登录 后发表(注册并验证邮箱)。
还没有评论,来抢沙发~