【问题标题】:Git clone fails on windows slaveWindows slave上的Git克隆失败
【发布时间】:2017-06-29 06:42:57
【问题描述】:

我正在尝试设置一个 Jenkins windows slave 来运行一些只能在 windows 上运行的测试套件。当我 git git clone 它挂起一段时间并最终超时并出现以下错误。我做了很多研究,但似乎找不到问题所在。我可以以通过 Jenkins 提供的用户身份登录该框,并直接进行克隆而不会出现问题。

由用户 Bert Alfred 远程创建 工作区中的 windows-jenkins-runner D:\Jenkins\workspace\selenium-runner

"c:\Program Files\Git\bin\git.exe" rev-parse --is-inside-work-tree # timeout=10 从远程 Git 存储库获取更改 "c:\Program Files\Git\bin\git.exe" 配置 remote.origin.url https://bertalfred@bitbucket.org/marypoppinsco/myproj-tests.git # timeout=10 从上游获取更改 https://bertalfred@bitbucket.org/marypoppinsco/myproj-tests.git "c:\Program Files\Git\bin\git.exe" --version # timeout=10 使用 GIT_ASKPASS 设置凭据 "c:\Program Files\Git\bin\git.exe" 获取 --tags --progress https://bertalfred@bitbucket.org/marypoppinsco/myproj-tests.git +refs/heads/:refs/remotes/origin/ 错误:10 分钟后超时 错误:获取远程 repo 'origin' 时出错 hudson.plugins.git.GitException:无法从中获取 https://bertalfred@bitbucket.org/marypoppinsco/myproj-tests.git 在 hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:803) 在 hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1063) 在 hudson.plugins.git.GitSCM.checkout(GitSCM.java:1094) 在 hudson.scm.SCM.checkout(SCM.java:495) 在 hudson.model.AbstractProject.checkout(AbstractProject.java:1278) 在 hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) 在 jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 在 hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 在 hudson.model.Run.execute(Run.java:1720) 在 hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 在 hudson.model.ResourceController.execute(ResourceController.java:98) 在 hudson.model.Executor.run(Executor.java:404) 引起: hudson.plugins.git.GitException: 命令 ""c:\Program Files\Git\bin\git.exe" 获取 --tags --progress https://bertalfred@bitbucket.org/marypoppinsco/myproj-tests.git +refs/heads/:refs/remotes/origin/" 返回状态码 1:stdout:处理泄露的文件描述符。请参阅 http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build 更多信息 处理泄露的文件描述符。看 http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build 了解更多信息

标准错误:在 org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1784) 在 org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1513) 在 org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64) 在 org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315) 在 org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) 在 org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) 在 hudson.remoting.UserRequest.perform(UserRequest.java:153) 在 hudson.remoting.UserRequest.perform(UserRequest.java:50) 在 hudson.remoting.Request$2.run(Request.java:332) 在 hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 在 java.util.concurrent.FutureTask.run(Unknown Source) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源)在 java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:88) at java.lang.Thread.run(Unknown Source) at ......远程调用 windows-jenkins-runner(本机方法)在 hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1433) 在 hudson.remoting.UserResponse.retrieve(UserRequest.java:253) 在 hudson.remoting.Channel.call(Channel.java:797) 在 org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.lang.reflect.Method.invoke(Method.java:497) 在 org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) 在 com.sun.proxy.$Proxy82.execute(未知来源) hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:801) ... 11 更多 错误:null 完成:失败

【问题讨论】:

  • 这似乎是一个 git checkout 问题?你能在 Windows 从机上测试 git checkout 吗?
  • GIT_ASKPASS 设置为什么?它几乎看起来好像在等你输入密码
  • @chenrui 正如我在问题中所说,我能够以我从从属盒传递凭据的用户身份登录,并从命令行成功克隆。这一切都适用于我的 linux master 和 slaves。所以我知道这只是我对 Windows 的不熟悉。
  • @JoePhillips 不幸的是,我什至不知道如何检查?
  • GIT_ASKPASS 在凭证提供程序中,您可能可以在{jenkins_host}/credentials中找到它

标签: git jenkins bitbucket


【解决方案1】:

GIT_ASKPASS 设置为什么?它几乎看起来好像在等你输入密码

您基本上需要确保为 Jenkins 设置的凭据管理器自动提供密码。

看到这个答案:Stuck at fetch due to authentication issue

【讨论】:

    猜你喜欢
    • 2021-01-13
    • 2011-06-11
    • 2011-12-24
    • 1970-01-01
    • 1970-01-01
    • 2018-07-29
    • 2016-12-17
    • 2019-05-10
    • 2014-09-03
    相关资源
    最近更新 更多