Jenkins proxy 407 error Jenkins proxy 407 error jenkins jenkins

Jenkins proxy 407 error


We had this issue a rather long time with our Jenkins behind our company's proxy. The other day they changed the order of authentication schemes our proxy desires. This was the day our Jenkins stopped connecting to the internet.

Obviously Jenkins is not able to connect via a proxy that requires NTML authentication. This was what lead me to issue an improvement for Jenkins to extend the proxy configuration screen. During the work on the extension I discovered that Jenkins does not make use of all proxy related system properties, therefore it cannot work with NTLM.

As such the answer for a proxy that allows only NTLM authentication is: it will not work via the Jenkins UI.

But if your proxy allows other authentication schemes, you can follow our workaround, it is rather simple: add the java system property -Dhttp.auth.preference="basic" to your Jenkins startup script or to that one of your container.

This will force the underlying libraries and Java mechanisms Jenkins makes use of to connect to your proxy using basic authentication, not NTLM.


for Java JDK8 and above, Oracle has disabled basic auth tunnelling for Basic authentication. If you want to use Basic mode again (security will be compromised), execute Jenkins adding this parameter to your JAVA_OPTS variable

    "-Djdk.http.auth.tunneling.disabledSchemes="

default value is

    "-Djdk.http.auth.tunneling.disabledSchemes=Basic", 

as Basic scheme is DISABLED by default, it will return HTTP 407 error even if your credentials were OK.

more on link https://issues.jenkins-ci.org/browse/JENKINS-48775 Thanks to Israel Romero Fiji


The below solution worked for me for the 407 problem in Windows 7 machine.

  • 1. Stop Jenkins from Windows Services
  • 2. Goto Services.msc > Jenkins > Right Click > Properties > Logon > This account and type in your username and password
  • 3. Click Apply and Ok
  • 3. Start Jenkins