我有詹金斯版本。 2.32.1 安装在我的 iMac 上,我已经为我的项目设置了 git 存储库,并提供了我的凭据。
注意:存储库是私有的。当从 Windows 克隆存储库时,它工作正常,但是当从 iMac 克隆相同的存储库时,它会给出以下日志,并且返回状态代码143
.
Started by user XYZ
Building in workspace /Users/Shared/Jenkins/Home/workspace/Project1
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/Organization/Repository # timeout=10
Fetching upstream changes from https://github.com/Organization/Repository
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --tags --progress https://github.com/Organization/Repository +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.com/Organization/Repository
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:803)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1063)
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:1728)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://github.com/Organization/Repository +refs/heads/*:refs/remotes/origin/*" returned status code 143:
stdout:
stderr:
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1772)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1516)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:67)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:318)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:801)
... 11 more
ERROR: null
Finished: FAILURE
我已经安装了 Git 插件,但我不明白为什么它无法从 GitHub 获取代码。任何人都可以通过查看日志来帮助我。
我得到了答案,问题是我的詹金斯没有完全访问我的用户,尽管它完全安装在另一个用户中并且显示詹金斯路径。当我在我的用户中重新安装 Jenkins 并为其提供完整的访问权限时,它就起作用了。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)