繁体   English   中英

jenkins-克隆远程仓库“ origin”时出错

[英]jenkins - Error cloning remote repo 'origin'

我已经在计算机上本地运行了安装的Jenkins服务器。 配置了一个Jenkins作业以克隆BitBucket存储库。 还执行以下操作:*最初生成SSH密钥以连接到BitBucket。 后来将其更改为使用用户名和密码从HTTPS克隆,该用户名和密码已在Jenkins的““凭据””部分中配置。*由于Jenkins作业,还在创建工作区的文件夹上进行了初始化。 在我的情况下,它是C:\\ Jenkins \\ jobs \\\\ workspace。

得到以下异常:

ERROR: Timeout after 10 minutes
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git.exe     
fetch --tags --progress     
https://<AccountName>@bitbucket.org/<repositoryName>/<projectName>.git 
+refs/heads/*:refs/remotes/origin/*" returned status code -1
:stdout 
:stderr: 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1745)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1489)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:512)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1054)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1094)
at hudson.scm.SCM.checkout(SCM.java:495)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1720)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
ERROR: null

我设法解决了这个问题。 我绝对确定这与git.exe路径有关,而且我是正确的。 当我在git bash中运行以下命令时,它为git.exe提供了不同的路径

$which git
/mingw64/bin/git

在我之前的配置中,我在/ bin / git位置指向git.exe。

暂无
暂无

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

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