0
votes

I have installed Jenkins ver. 1.653 on OSX 10.11.3 using standard installer and added git plugin. I tried to create job for public project from github and it works. Now I am trying to create job for private repo using username and password but it always fails. This is log:

Started by user anonymous

Building in workspace /Users/Shared/Jenkins/Home/workspace/MyProject

git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository git config remote.origin.url https://github.com/myproject/myproject-android.git # timeout=10 Fetching upstream changes from https://github.com/myproject/myproject-android.git git --version # timeout=10 using .gitcredentials to set credentials git config --local credential.username vandzi # timeout=10 git config --local credential.helper store --file=/Users/Shared/Jenkins/tmp/git428140271294555744.credentials # timeout=10 git -c core.askpass=true fetch --tags --progress https://github.com/myproject/myproject-android.git +refs/heads/:refs/remotes/origin/ ERROR: Timeout after 10 minutes git config --local --remove-section credential # timeout=10 ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from https://github.com/myproject/myproject-android.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 https://github.com/myproject/myproject-android.git +refs/heads/:refs/remotes/origin/" returned status code 143: 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:764) ... 11 more ERROR: null Finished: FAILURE

Any idea what can be problem?

1

1 Answers

0
votes

Also had ERROR: null in the end, for me it was timeout issue. You can increase timeout for cloning and checkout like this:

  1. Go to job configuration and find git section
  2. Add -> Advanced clone behaviours. There you can specify timeout and check 'shallow copy' (which is faster)
  3. Add -> Advanced checkout behaviours. You can set time out for checkout.