How to use proxy socks with Jenkins

1,344 views
Skip to first unread message

donovan.b...@gmail.com

unread,
Nov 27, 2015, 6:34:13 AM11/27/15
to Jenkins Users
Hi, i have installed Jenkins inside our corporate network. I would like to SSH to Github to pull down code but i can't work out how to configure Jenkins to use socks proxy 5 instead of a normal http proxy. We can only SSH outside if we use a socks proxy. Is it a system wide change or a change we need to make in Jenkins?

Christopher Orr

unread,
Nov 27, 2015, 6:52:58 PM11/27/15
to jenkins...@googlegroups.com
It should work if you use the regular Java proxy properties:
https://wiki.jenkins-ci.org/display/JENKINS/JenkinsBehindProxy

i.e. "socksProxyHost" and co:
https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html

Regards,
Chris
> --
> 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
> <mailto:jenkinsci-use...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/573d3825-290d-47dc-af47-bea8591f1606%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/573d3825-290d-47dc-af47-bea8591f1606%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

donovan.b...@gmail.com

unread,
Nov 30, 2015, 4:55:13 AM11/30/15
to Jenkins Users
Thanks but where do you specify the socks proxy settings? Can this be added to the jenkins startup script? I have tried but the process doesn't start so i am clearly putting it in the wrong place. Has anyone got this successfully working?


On Friday, 27 November 2015 23:52:58 UTC, Christopher Orr wrote:
It should work if you use the regular Java proxy properties:
https://wiki.jenkins-ci.org/display/JENKINS/JenkinsBehindProxy

i.e. "socksProxyHost" and co:
https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html

Regards,
Chris


On 27/11/15 12:34, donovan.b...@gmail.com wrote:
> Hi, i have installed Jenkins inside our corporate network. I would like
> to SSH to Github to pull down code but i can't work out how to configure
> Jenkins to use socks proxy 5 instead of a normal http proxy. We can only
> SSH outside if we use a socks proxy. Is it a system wide change or a
> change we need to make in Jenkins?
>
> --
> 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

Christopher Orr

unread,
Dec 1, 2015, 7:49:07 PM12/1/15
to jenkins...@googlegroups.com
From the example on the wiki page, you add them as Java options:

java -D<proxy-option> -D<another-proxy-option> -jar jenkins.war


You don't mention which OS or Jenkins package you're using, or how you
modified the startup script, so it's hard to give specific info.

But on Debian, you would modify JAVA_ARGS in /etc/default/jenkins, and
JENKINS_JAVA_OPTIONS in /etc/sysconfig/jenkins for the RPM package.

There's some more info to be found on the wiki here:
https://wiki.jenkins-ci.org/display/JENKINS/Use+Jenkins#UseJenkins-RunningJenkinsasadaemon

Regards,
Chris
> > an email to jenkinsci-use...@googlegroups.com <javascript:>
> > <mailto:jenkinsci-use...@googlegroups.com <javascript:>>.
> <https://groups.google.com/d/msgid/jenkinsci-users/573d3825-290d-47dc-af47-bea8591f1606%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/optout>.
>
> --
> 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
> <mailto:jenkinsci-use...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/f4059e21-db64-4214-bc4f-b252862a2801%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/f4059e21-db64-4214-bc4f-b252862a2801%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages