Jenkins 克隆失败,AWS 代码提交存储库(状态代码 143)
Jenkins clone fails with AWS code-commit repository (status code 143)
我已经在我的 Mac 中安装了 Jenkins,我正在尝试克隆一个 AWS 代码提交存储库(URL 看起来像这样:https://git-codecommit.us-east-1.amazonaws.com/v5/repos/testRepo)。
存储库只有几 MB,可以使用终端使用 git 克隆命令进行克隆,但 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.access0(CliGitAPIImpl.java:72)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.execute(CliGitAPIImpl.java:420)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886)
... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE
我也将时间增加到 30 分钟,但没有成功。我希望 Jenkins 能够毫无错误地克隆存储库。
非常感谢任何帮助。
您的用户访问权限似乎有问题。要解决它,您可以尝试在配置中使用 ssh 而不是 https 或从命令行重新安装 Jenkins(如果 Jenkins 是使用 .pkg
文件安装的,MacOS 用户有时会出现此问题)。有关详细信息,请参阅 问题的答案。
我已经在我的 Mac 中安装了 Jenkins,我正在尝试克隆一个 AWS 代码提交存储库(URL 看起来像这样:https://git-codecommit.us-east-1.amazonaws.com/v5/repos/testRepo)。
存储库只有几 MB,可以使用终端使用 git 克隆命令进行克隆,但 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.access0(CliGitAPIImpl.java:72)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.execute(CliGitAPIImpl.java:420)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886)
... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE
我也将时间增加到 30 分钟,但没有成功。我希望 Jenkins 能够毫无错误地克隆存储库。
非常感谢任何帮助。
您的用户访问权限似乎有问题。要解决它,您可以尝试在配置中使用 ssh 而不是 https 或从命令行重新安装 Jenkins(如果 Jenkins 是使用 .pkg
文件安装的,MacOS 用户有时会出现此问题)。有关详细信息,请参阅