【发布时间】:2016-11-18 09:32:53
【问题描述】:
我是 Jenkins 的相对新手,我试图简单地从存储在 Bitbucket 上的代码运行构建。我正在使用 git。我已将作业源控制设置为 https 协议: 网址:https://myaccount@bitbucket.org/myaccount/myrepo.git 凭据:用户名/密码
'build' 部分指向根目录中的 pom.xml 并运行干净的测试 maven 目标
我有 Git 插件 2.5.2
我将 Jenkins 作为 Windows 服务 (Windows 10) 运行。
构建项目的错误是
ERROR: Timeout after 10 minutes
git.exe config --local --remove-section credential # timeout=10 错误:获取远程 repo 'origin' 时出错 hudson.plugins.git.GitException:无法从https://username@bitbucket.org/username/myrepo.git 获取 在 hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799) 在 hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055) 在 hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086) 在 hudson.scm.SCM.checkout(SCM.java:495) 在 hudson.model.AbstractProject.checkout(AbstractProject.java:1270) 在 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.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) 在 hudson.model.ResourceController.execute(ResourceController.java:98) 在 hudson.model.Executor.run(Executor.java:404) 引起:hudson.plugins.git.GitException: Command "git.exe -c core.askpass=true fetch --tags --progress https://username@bitbucket.org/username/myrepo.git +refs/heads/:refs/remotes/origin/ em>" 返回状态码 -1:
欢迎任何建议
【问题讨论】:
-
尽管不允许(非交互式外壳),但 git 很有可能要求输入密码,这是一个私人仓库。您需要以其他方式提供密码。
-
您能否在工作中的构建步骤中 ping bitbucket.org?
标签: git jenkins jenkins-plugins