繁体   English   中英

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

[英]Jenkins build fails while manual build succeeds

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

我只是在jenkins配置中将存储库URL从“ http:// ”更改为“ git @ gitlab ”,并忽略了红色注释“无法连接到存储库”,因此在我构建时就可以了!

我猜这是Jenkins节点问题,还是希望能有所帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM