3
votes

some thing weird thing happened to my Jenkins setup and killing me for whole day to solve the issue.

I have Jenkins job setup which connects to git repository on remote server through Http proxy. Below are the details

Jenkins Version: 1.527

Git client plugin : 1.9.1

Git plugin : 2.2.2

It was working fine for more than a month without any issue. But started giving Http 503 error when it try to pull the latest changes from that repository recently.

Below is the error:

Fetching changes from the remote Git repository

git.exe config remote.origin.url https://<userName>:<Passwd>@<giturl>

Fetching upstream changes from https://<userName>@<giturl>

git.exe --version FATAL: Failed to fetch from https://<userName>@<giturl>

hudson.plugins.git.GitException: Failed to fetch from https://<userName>@<giturl> at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:623) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:855) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:880) at hudson.model.AbstractProject.checkout(AbstractProject.java:1408) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581) at hudson.model.Run.execute(Run.java:1597) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247) Caused by: hudson.plugins.git.GitException: Failed to connect to https://<userName>@<giturl> (status = 503)
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.checkCredentials(CliGitAPIImpl.java:1978)

1
Upon debugging the git client plugin code base, CliGitAPIImpl.java Proxy credentials are null, Not setting proxy credentails Checking http client:https://<url>/info/refs Executed:GET https://<url>/info/refs HTTP/1.1 status:503 Checking http client:https://<url>/info/refs?service=git-upload-pack Executed:GET https://<url>/info/refs?service=git-upload-pack HTTP/1.1 status:503 FATAL: Failed to fetch from https://<url> hudson.plugins.git.GitException: Failed to fetch from https://<url> at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:622) - user1093097

1 Answers

3
votes

After working with my network team, it is a issue with Http Proxy. I was asked to use git:// instead of https:// in the github URL. It works great now.