简体   繁体   中英

Jenkins fails to run gulp build task with Github plugin

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 ?

The problem is that git fetch runs into a timeout after 10 minutes:

 > 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

You can increase the timeout by adding "Advanced clone behaviours" in "Additional Behaviours" and set the "Timeout (in minutes) for clone and fetch operations" to eg 20.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM