不确定为什么Jenkins无法从Bitbucket服务器获取repo。我在Jenkins奴隶中运行Git for Windows。使用最新的Jenkins社区LTS版本,即2.107.2。请参阅下面的错误日志 -
23:39:06 ERROR: Timeout after 10 minutes
23:39:07 ERROR: Error fetching remote repo 'origin'
23:39:07 hudson.plugins.git.GitException: Failed to fetch from https://xxx/stash/xyz.git
23:39:07 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
23:39:07 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
23:39:07 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1160)
23:39:07 at hudson.scm.SCM.checkout(SCM.java:504)
23:39:07 at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
23:39:07 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
23:39:07 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
23:39:07 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
23:39:07 at hudson.model.Run.execute(Run.java:1727)
23:39:07 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
23:39:07 at hudson.model.ResourceController.execute(ResourceController.java:97)
23:39:07 at hudson.model.Executor.run(Executor.java:429)
23:39:07 Caused by: hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git.exe fetch --tags --progress https://xxx/stash/xyz.git +refs/heads/*:refs/remotes/origin/*" returned status code -1:
以下更多 -
23:39:07 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1996)
23:39:07 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1715)
23:39:07 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
23:39:07 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
23:39:07 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
23:39:07 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
23:39:07 at hudson.remoting.UserRequest.perform(UserRequest.java:210)
23:39:07 at hudson.remoting.UserRequest.perform(UserRequest.java:53)
23:39:07 at hudson.remoting.Request$2.run(Request.java:364)
23:39:07 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
23:39:07 at java.util.concurrent.FutureTask.run(Unknown Source)
23:39:07 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
23:39:07 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
23:39:07 at hudson.remoting.Engine$1$1.run(Engine.java:94)
23:39:07 at java.lang.Thread.run(Unknown Source)
23:39:07 Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 172.27.137.169/172.27.137.169:64357
23:39:07 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1737)
23:39:07 at hudson.remoting.UserResponse.retrieve(UserRequest.java:313)
23:39:07 at hudson.remoting.Channel.call(Channel.java:952)
23:39:07 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
23:39:07 at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)
23:39:07 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
23:39:07 at java.lang.reflect.Method.invoke(Unknown Source)
23:39:07 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
23:39:07 at com.sun.proxy.$Proxy73.execute(Unknown Source)
23:39:07 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:860)
23:39:07 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
23:39:07 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1160)
23:39:07 at hudson.scm.SCM.checkout(SCM.java:504)
23:39:07 at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
23:39:07 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
23:39:07 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
23:39:07 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
23:39:07 at hudson.model.Run.execute(Run.java:1727)
23:39:07 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
23:39:07 at hudson.model.ResourceController.execute(ResourceController.java:97)
23:39:07 at hudson.model.Executor.run(Executor.java:429)
我可以从Git bash克隆同一个奴隶的回购。存储库可见性是公开的。 Jenkins主服务器和从服务器都在Windows上运行。