Jenkins克隆因AWS代码提交存储库(状态代码143)而失败

时间:2019-01-22 08:32:47

标签: git amazon-web-services jenkins aws-codecommit

我已经在Mac上安装了Jenkins,并且我试图克隆一个AWS代码提交存储库(URL看起来像这样:https://git-codecommit.us-east-1.amazonaws.com/v5/repos/testRepo)。

存储库只有几个MB,可以使用git clone命令在终端上克隆,但是Jenkins抛出以下错误

ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://git-codecommit.us-east-1.amazonaws.com/v5/repos/testRepo
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:888)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
    at hudson.scm.SCM.checkout(SCM.java:504)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
    at hudson.model.Run.execute(Run.java:1810)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://git-codecommit.us-east-1.amazonaws.com/v5/repos/testRepo +refs/heads/*:refs/remotes/origin/*" returned status code 143:
stdout: 
stderr: 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1735)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:420)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886)
    ... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE

我也将时间延长到30分钟,但没有运气。我希望詹金斯能够克隆存储库而不会出现任何错误。

我们非常感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

似乎您的用户访问权限有问题。要解决此问题,您可以尝试在配置中使用ssh而不是https或通过命令行重新安装Jenkins(如果使用.pkg文件安装了Jenkins,则MacOS用户有时会出现此问题)。有关更多详细信息,请参见this问题的答案。