手动构建成功时,Jenkins构建失败

时间:2018-05-29 13:58:57

标签: ios git jenkins gitlab jenkins-plugins

Jenkins构建失败

git fetch --tags --progress http://gitlab.***.com/iOS-Team/iOSProject.git +refs/heads/*:refs/remotes/origin/* --depth=1 # timeout=10

它立刻失败了,所以基本上它不是超时问题。

我尝试登录到macOS服务器并手动运行该命令,但工作正常。

我已将节点从macOS服务器切换到一台工作正常的Windows服务器。所以我想这不是配置问题。

Started by user ios管理员
21:34:29 Building remotely on mac_mini in workspace /Users/jenkins/jenkins/workspace/workspace/BPC_iOS_Release
21:34:29  > git rev-parse --is-inside-work-tree # timeout=10
21:34:29 Fetching changes from the remote Git repository
21:34:29  > git config remote.origin.url http://gitlab.***.com/iOS-Team/iOSProject.git # timeout=10
21:34:29 Fetching upstream changes from http://gitlab.***.com/iOS-Team/iOSProject.git
21:34:29  > git --version # timeout=10
21:34:29 using GIT_ASKPASS to set credentials 
21:34:29  > git fetch --tags --progress http://gitlab.***.com/iOS-Team/iOSProject.git +refs/heads/*:refs/remotes/origin/* --depth=1 # timeout=10
21:34:30 ERROR: Error fetching remote repo 'origin'
21:34:30 hudson.plugins.git.GitException: Failed to fetch from http://gitlab.***.com/iOS-Team/iOSProject.git
21:34:30    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:888)
21:34:30    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155)
21:34:30    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
21:34:30    at hudson.scm.SCM.checkout(SCM.java:504)
21:34:30    at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
21:34:30    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
21:34:30    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
21:34:30    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
21:34:30    at hudson.model.Run.execute(Run.java:1727)
21:34:30    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
21:34:30    at hudson.model.ResourceController.execute(ResourceController.java:97)
21:34:30    at hudson.model.Executor.run(Executor.java:429)
21:34:30 Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress http://gitlab.***.com/iOS-Team/iOSProject.git +refs/heads/*:refs/remotes/origin/* --depth=1" returned status code 128:
21:34:30 stdout: 
21:34:30 stderr: remote: Not Found
21:34:30 fatal: repository 'http://gitlab.***.com/iOS-Team/iOSProject.git/' not found
21:34:30 
21:34:30    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2002)
21:34:30    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1721)
21:34:30    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
21:34:30    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
21:34:30    at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
21:34:30    at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
21:34:30    at hudson.remoting.UserRequest.perform(UserRequest.java:210)
21:34:30    at hudson.remoting.UserRequest.perform(UserRequest.java:53)
21:34:30    at hudson.remoting.Request$2.run(Request.java:364)
21:34:30    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
21:34:30    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
21:34:30    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
21:34:30    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
21:34:30    at hudson.remoting.Engine$1$1.run(Engine.java:94)
21:34:30    at java.lang.Thread.run(Thread.java:748)
21:34:30    Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 192.168.1.25/192.168.1.25:50391
21:34:30        at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1737)
21:34:30        at hudson.remoting.UserResponse.retrieve(UserRequest.java:313)
21:34:30        at hudson.remoting.Channel.call(Channel.java:952)
21:34:30        at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
21:34:30        at sun.reflect.GeneratedMethodAccessor1218.invoke(Unknown Source)
21:34:30        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
21:34:30        at java.lang.reflect.Method.invoke(Method.java:498)
21:34:30        at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
21:34:30        at com.sun.proxy.$Proxy81.execute(Unknown Source)
21:34:30        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886)
21:34:30        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155)
21:34:30        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
21:34:30        at hudson.scm.SCM.checkout(SCM.java:504)
21:34:30        at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
21:34:30        at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
21:34:30        at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
21:34:30        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
21:34:30        at hudson.model.Run.execute(Run.java:1727)
21:34:30        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
21:34:30        at hudson.model.ResourceController.execute(ResourceController.java:97)
21:34:30        at hudson.model.Executor.run(Executor.java:429)
21:34:30 ERROR: Error fetching remote repo 'origin'
21:34:30 Finished: FAILURE

1 个答案:

答案 0 :(得分:0)

我只是更改了#34; http:// " to" git @ gitlab "在jenkins配置中,忽略了红色注释"无法连接到存储库",当我构建时,它工作了!。

我想这是一个詹金斯节点问题或其他什么,希望它会有所帮助。