I've tried the same steps in Mac it works without any problem, in my Windows machine when I try to run a simple Gulp build task with Jenkins Github plugin it wont work, I just tried every think (allows Git/java in the firewall, changing the timeout value, restarting the service, run the service from the cmd...) , still throws the same ERROR :
Started by user anonymous
Building in workspace C:\Program Files (x86)\Jenkins\jobs\git_pull\workspace
> C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> C:\Program Files\Git\bin\git.exe config remote.origin.url https://github.com/lapalateam/LapalaApp.git # timeout=10
Fetching upstream changes from https://github.com/lapalateam/LapalaApp.git
> C:\Program Files\Git\bin\git.exe --version # timeout=10
using .gitcredentials to set credentials
> C:\Program Files\Git\bin\git.exe config --local credential.username zerubeus@gmail.com # timeout=10
> C:\Program Files\Git\bin\git.exe config --local credential.helper store --file=\"c:\temp\git8251275763118801702.credentials\" # timeout=10
> C:\Program Files\Git\bin\git.exe -c core.askpass=true fetch --tags --progress https://github.com/lapalateam/LapalaApp.git +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
> C:\Program Files\Git\bin\git.exe config --local --remove-section credential # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.com/lapalateam/LapalaApp.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
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 "C:\Program Files\Git\bin\git.exe -c core.askpass=true fetch --tags --progress https://github.com/lapalateam/LapalaApp.git +refs/heads/*:refs/remotes/origin/*" returned status code -1:
stdout:
stderr:
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.access$300(CliGitAPIImpl.java:63)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:808)
... 11 more
ERROR: null
Finished: FAILURE
Can someone help me figuring out what's going wrong ?
答案 0 :(得分:0)
问题是git fetch
在10分钟后进入超时状态:
> C:\Program Files\Git\bin\git.exe -c core.askpass=true fetch --tags --progress https://github.com/lapalateam/LapalaApp.git +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
您可以通过添加"高级克隆行为"来增加超时时间。在"附加行为"并设置"超时(以分钟为单位)进行克隆和获取操作"例如20。