詹金斯:错误:获取远程存储库“来源”时出错

Ste*_*ike 8 git jenkins jenkins-plugins

我是 Jenkins 的新手,我正在尝试简单地从 Bitbucket 上存储的代码运行构建。我正在使用 git。我已将作业源代码控制设置为 https 协议: url: https://myaccount@bitbucket.org/myaccount/myrepo.git 凭据:用户名/密码

“build”部分指向根目录中的 pom.xml 并运行干净的测试 Maven 目标

我有 Git 插件 2.5.2

我将 Jenkins 作为 Windows 服务 (Windows 10) 运行。

构建项目时的错误是

ERROR: Timeout after 10 minutes
Run Code Online (Sandbox Code Playgroud)

git.exe config --local --remove-section credential # timeout=10 错误:获取远程存储库“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:命令“git.exe -c core.askpass=true fetch --tags --progress https://username@bitbucket.org/username/myrepo.git +refs/heads/ :refs/remotes/origin/ " 返回状态码-1:

有任何建议欢迎

raz*_*zon 4

正如我在这里回答的/sf/answers/3077536871/

尝试禁用 git 凭证缓存的使用

git config --global --unset credential.helper
Run Code Online (Sandbox Code Playgroud)

你可能还需要做

git config --system --unset credential.helper
Run Code Online (Sandbox Code Playgroud)

如果已在系统配置文件中设置