Sukhvir Singh
Sukhvir Singh

Reputation: 168

Git Fetch in Jenkins failing with timeout during build process for Bitbucket repository

I am working on setting up Jenkins for our Android project placed on Bitbucket repository. I am continuously getting timeout during git fetch command as part of build process. Below are the console logs.

started by user SUKHVIR SINGH

Building in workspace C:/RCJenkins Cloning the remote Git repository Cloning repository

https://[email protected]/scm//myproject.git git.exe init C:\RCJenkins # timeout=10 Fetching upstream changes from https://[email protected]/scm//myproject.git git.exe --version # timeout=10 using GIT_ASKPASS to set credentials Setting http proxy: abc.xyz.company.com:80 git.exe fetch --tags --progress https://[email protected]/scm//myproject.git +refs/heads/:refs/remotes/origin/ ERROR: Timeout after 10 minutes ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "git.exe fetch --tags --progress https://[email protected]/scm//myproject.git +refs/heads/:refs/remotes/origin/" returned status code -1: stdout: stderr: at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1924) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1643) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:352) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:559) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1075) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1115) at hudson.scm.SCM.checkout(SCM.java:495) at hudson.model.AbstractProject.checkout(AbstractProject.java:1276) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485) at hudson.model.Run.execute(Run.java:1735) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405) ERROR: Error cloning remote repo 'origin' Finished: FAILURE

What I did so far :-

1) Downloaded and installed latest stable Jenkins 2.60.2 on my local machine 2) Created admin user. 3) Created a Freestyle job. 4) Configured the job to use reposiory url "https://[email protected]/scm//myproject.git" and added repository credentials in Jenkins credentials manager.

Earlier, the workspace being used did not had right permissions on my machine and even git command line was not working. Now I have change Job configuration to use custom workspace location which have write/read permissions. I am able to execute git commands through commandline in the workspace but when I start build process through Jenkins, I get above mentioned timeout error. Below is the screenshot of my job configuration. enter image description here

Upvotes: 0

Views: 1597

Answers (1)

qräbnö
qräbnö

Reputation: 3031

  1. Download and install Wireshark, to see whats going on on your network. To do so, double click your network interface/start recording, do 2., stop recording, search with "String" and "Packet bytes" for your URL and right click -> Follow -> TCP Stream.

  2. Test your exact link again. First with validate proxy, then with build.

Upvotes: 0

Related Questions