Hudson git commands are *incredibly* slow(使用来自PuTTY的plink.exe并设置GIT_SSH使用它)
Jenkins hanging at "Fetching upstream changes from origin"(将Jenkins更改为使用cmd\git.exe而不是bin\git.exe)
Jenkins的控制台输出日志:
由远程主机启动
在 F:\Jenkins\jobs\xxx\workspace 的主分支上构建
> git.exe rev-parse --is-inside-work-tree # 超时=10
从远程 Git 存储库获取更改
> git.exe config remote.origin.url xhttp://scm/git/xxx # 超时=10
从 xhttp://scm/git/xxx 获取上游更改
> git.exe --version # 超时=10
使用 .gitcredentials 设置凭据
> git.exe config --local credential.helper store --file=\"C:\Users\APP_JE~1\AppData\Local\Temp\git7476037793811743133.credentials\" # 超时=10
> git.exe -c core.askpass=true fetch --tags --progress xhttp://scm/git/xxx +refs/heads/:refs/remotes/origin/
问题在这里:上述命令可能需要 30 秒到 120 秒。在本地开发机器上只需要几秒钟。
> git.exe config --local --remove-section credential # 超时=10
版本信息:
Jenkins版本为最新版1.608, 操作系统为Windows Server 2012, Git版本为最新版1.9.5 (Windows下载地址:http://git-scm.com/download/win), Jenkins使用的Git客户端插件版本为最新版1.16.1, Jenkins使用的Git插件版本为最新版2.3.5。 Jenkins运行在具有服务器管理员访问权限的域用户身份下。
$ git config --global core.preloadindex true
$ git config --global core.fscache true
$ git config --global gc.auto 256
- Thomas T