Jenkins git 获取超时
Jenkins git fetch timeout
我在我的 Mac OS X Mavericks 机器上 运行ning Jenkins 2.0 正在工作。我正在尝试从内部服务器中下载一个存储库。但是,作业在 git fetch
调用中挂起 10 分钟,然后超时。
如果我从 shell 脚本(从 Jenkins 内部)手动 运行 git clone
或 git fetch
,我会得到相同的总体结果,除了作业会无休止地挂起.
我可以从终端 运行 clone
或 fetch
命令就好了。
我想知道这是否是某种需要解决的用户权限错误。
这是日志:
Started by user Colin Basnett
Building in workspace /Users/Shared/Jenkins/Home/workspace/Service
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url http://192.168.4.40/Bonobo.Git.Server/Service.git # timeout=10
Fetching upstream changes from http://192.168.4.40/Bonobo.Git.Server/Service.git
> git --version # timeout=10
using .gitcredentials to set credentials
> git config --local credential.username jenkins # timeout=10
> git config --local credential.helper store --file=/Users/Shared/Jenkins/tmp/git8010092725741498465.credentials # timeout=10
> git -c core.askpass=true fetch --tags --progress http://192.168.4.40/Bonobo.Git.Server/Service.git +refs/heads/*:refs/remotes/origin/*
> git config --local --remove-section credential # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from http://192.168.4.40/Bonobo.Git.Server/Service.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:766)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1022)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1053)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress http://192.168.4.40/Bonobo.Git.Server/Service.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: fatal: Authentication failed for 'http://192.168.4.40/Bonobo.Git.Server/Service.git/'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access0(CliGitAPIImpl.java:63)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.execute(CliGitAPIImpl.java:314)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:764)
... 11 more
ERROR: null
Finished: FAILURE
提前感谢您的帮助。
对我来说这是短暂的超时。在您的情况下,您可能需要执行以下操作:
- 增加克隆和签出的超时时间
- 转到作业配置并找到 git 部分
- 添加 -> 高级克隆行为。在那里你可以指定超时并检查 'shallow copy' (更快)
- 添加 -> 高级结帐行为。您可以设置结帐时间。
- 确保您在作业配置 - 源代码管理 - Git - 凭据中提供了正确的凭据
我在我的 Mac OS X Mavericks 机器上 运行ning Jenkins 2.0 正在工作。我正在尝试从内部服务器中下载一个存储库。但是,作业在 git fetch
调用中挂起 10 分钟,然后超时。
如果我从 shell 脚本(从 Jenkins 内部)手动 运行 git clone
或 git fetch
,我会得到相同的总体结果,除了作业会无休止地挂起.
我可以从终端 运行 clone
或 fetch
命令就好了。
我想知道这是否是某种需要解决的用户权限错误。
这是日志:
Started by user Colin Basnett
Building in workspace /Users/Shared/Jenkins/Home/workspace/Service
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url http://192.168.4.40/Bonobo.Git.Server/Service.git # timeout=10
Fetching upstream changes from http://192.168.4.40/Bonobo.Git.Server/Service.git
> git --version # timeout=10
using .gitcredentials to set credentials
> git config --local credential.username jenkins # timeout=10
> git config --local credential.helper store --file=/Users/Shared/Jenkins/tmp/git8010092725741498465.credentials # timeout=10
> git -c core.askpass=true fetch --tags --progress http://192.168.4.40/Bonobo.Git.Server/Service.git +refs/heads/*:refs/remotes/origin/*
> git config --local --remove-section credential # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from http://192.168.4.40/Bonobo.Git.Server/Service.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:766)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1022)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1053)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress http://192.168.4.40/Bonobo.Git.Server/Service.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: fatal: Authentication failed for 'http://192.168.4.40/Bonobo.Git.Server/Service.git/'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access0(CliGitAPIImpl.java:63)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.execute(CliGitAPIImpl.java:314)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:764)
... 11 more
ERROR: null
Finished: FAILURE
提前感谢您的帮助。
对我来说这是短暂的超时。在您的情况下,您可能需要执行以下操作:
- 增加克隆和签出的超时时间
- 转到作业配置并找到 git 部分
- 添加 -> 高级克隆行为。在那里你可以指定超时并检查 'shallow copy' (更快)
- 添加 -> 高级结帐行为。您可以设置结帐时间。
- 确保您在作业配置 - 源代码管理 - Git - 凭据中提供了正确的凭据