Proxy for branch indexing in multibranch pipeline

539 views
Skip to first unread message

Lionel Orellana

unread,
Apr 29, 2016, 1:51:58 AM4/29/16
to Jenkins Users
Hi

I have a proxy configured in my Jenkins settings (Manage Plugins -> Advanced). 

I'm pretty sure this is what makes freestyle jobs and Pipelines set the proxy before connecting to github. 

Here's the output from a Pipeline job:

 > /opt/rh/devtoolset-2/root/usr/bin/git config --local credential.helper store --file=/tmp/git7252640829815953814.credentials # timeout=10
Setting http proxy: serverproxy:8080
 > /opt/rh/devtoolset-2/root/usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/****/*****.git +refs/heads/*:refs/remotes/origin/*


But when I try to run the indexing job in a Multibranch pipeline it fails to connect to github. It seems to me it is not setting the proxy.

FATAL: Failed to recompute children of Debt Agreement Service Pipeline
hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.TransportException: https://github.com/*****/*****.git: cannot open git-upload-pack
	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:680)
	at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:174)
	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:146)
	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:296)
	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:151)
	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:122)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Caused by: org.eclipse.jgit.api.errors.TransportException: https://github.com/******/*******.git: cannot open git-upload-pack
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:678)
	... 7 more
Caused by: org.eclipse.jgit.errors.TransportException: https://github.com/*****/******.git: cannot open git-upload-pack
	at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:524)
	at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:309)
	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
	... 8 more
Caused by: java.net.ConnectException: Connection timed out github.com
	at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:175)
	at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:475)
	... 13 more
Finished: FAILURE

Is there a way to set the proxy or could it be something different?

Thanks

Lionel Orellana

unread,
Apr 29, 2016, 8:58:08 PM4/29/16
to Jenkins Users

Upgrading from 1.656 to 2.0 fixed it.

The GitHub Branch Source Plugin is probably what made the difference. I was using a Git (as opposed to GitHub) branch source before.

Tarek Nabil

unread,
May 2, 2016, 4:22:07 AM5/2/16
to Jenkins Users
I'm facing the same problem, but I do not want to upgrade to 2.0. Would appreciate other suggestions.

Patrick Wolf

unread,
May 2, 2016, 4:25:56 AM5/2/16
to jenkins...@googlegroups.com
There shouldn't be anything specific in Jenkins core affecting this. When Lionel upgraded he probably upgraded his plugins at the same time. Make sure you are running the latest version of GitHub Branch Source and Branch-API plugins and see if that fixes it.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/98523cdd-0eba-495a-ae3a-30dc8a7ff3fd%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Patrick Wolf
Sr. Product Manager
CloudBees

Lionel Orellana

unread,
May 2, 2016, 8:11:58 AM5/2/16
to Jenkins Users
It was the switch from the Git branch source to the GitHub branch source what probably fixed mine. I only found there was a github one whe I upgraded.

Tarek Nabil

unread,
May 2, 2016, 8:21:56 PM5/2/16
to Jenkins Users
Well, the problem is, my code is not on GitHub; it's on BitBucket.

The question is: what is the branch indexing doing differently from any other job that uses Git? We have like a hundred jobs and none of them has Git connectivity issues. It just seems that in this particular case, the proxy configuration is not used.

Dominik Bartsch

unread,
Feb 6, 2018, 8:11:54 AM2/6/18
to Jenkins Users
Is there any update on this? I am accessing a github enterprise repo and it also seem to not using the proxy settings...
Reply all
Reply to author
Forward
0 new messages