Oracle 系统管理 - Linux 系统 - Backtrack 5 - 安全 - Juniper 技术 - Cisco 技术 - 思科模拟器 - Cisco 认证 - Cisco ios 下载

您现在的位置是:Docker > Jenkins > Jenkins的Error fetching remote repo 'origin'

Jenkins的Error fetching remote repo 'origin'

时间:2018-06-15 13:18  来源:未知  阅读次数: 复制分享 我要评论

为已有项目部署了新的Jenkins服务器,Jenkins服务器上创建的Job执行总是出现如下异常:

Started by user ***
[EnvInject] - Loading node environment variables.
Building remotely on esekilxv9257 (6.9 TEAC_STAGING RedHatEnterpriseServer amd64-RedHatEnterpriseServer RedHatEnterpriseServer-6.9 amd64-RedHatEnterpriseServer-6.9 amd64) in workspace <https://fem007-eiffel025.rnd.ki.sw.ericsson.se:8443/jenkins/job/Poco_UnitTest/ws/>
 > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository  > /usr/bin/git config remote.origin.url ssh://gerrit.ericsson.se:29418/ica/poco-all # timeout=10 Fetching upstream changes from ssh://gerrit.ericsson.se:29418/ica/poco-all
 > /usr/bin/git --version # timeout=10
using GIT_SSH to set credentials
 > /usr/bin/git fetch --tags --progress ssh://gerrit.ericsson.se:29418/ica/poco-all refs/changes/*:refs/changes/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from ssh://gerrit.ericsson.se:29418/ica/poco-all
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:817)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1084)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1115)
	at hudson.scm.SCM.checkout(SCM.java:496)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
	at hudson.model.Run.execute(Run.java:1728)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:542)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:405)
Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git fetch --tags --progress ssh://gerrit.ericsson.se:29418/ica/poco-all refs/changes/*:refs/changes/*" returned status code 128:
stdout: 
stderr: fatal: Project not found: ica/poco-all
fatal: The remote end hung up unexpectedly

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1924)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1643)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:352)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
	at hudson.remoting.Request$2.run(Request.java:336)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:748)
	at ......remote call to esekilxv9257(Native Method)
	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
	at hudson.remoting.Channel.call(Channel.java:830)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
	at sun.reflect.GeneratedMethodAccessor1729.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
	at com.sun.proxy.$Proxy154.execute(Unknown Source)
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:815)
	... 11 more
ERROR: Error fetching remote repo 'origin'
Skipping sonar analysis due to bad build status FAILURE [BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds Started calculate disk usage of workspace Finished Calculation of disk usage of workspace in 0 seconds

可以看到,该Job试图从Gerrit服务器上取ica/poco-all项目的临时分支,Jenkins服务器上已经配置了Git,并且Git插件也已经配置。

打开Job的配置页面,发现如下错误提示:

怀疑Job执行过程中使用的Git用户的验证可能未通过。解决过程如下:

  • 在Jenkins服务器上,为用户使用keygen重新公私钥
  • 在Gerrit服务器上,更新该用户的公钥,检查用户是否拥有对ica/poco-all项目的访问权限

完毕后,Job的配置页面即可发现相应的错误消失了,再次执行Job构建即可成功。

相关资讯