[英]Jenkins: IOException: Unable to tunnel through proxy. Proxy returns “HTTP/1.1 407 Proxy Authentication Required”
First of all I want to tell that this question isn´t duplicate . 首先,我想说这个问题不是重复的 。
I want to install plugin in Jenkins. 我想在Jenkins中安装插件。 I went to Update Center but I can´t install anything because I have this error:
我去了更新中心,但由于有此错误,我无法安装任何东西:
IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required".
Also when it comes to Java, I have Java for 64 bit. 另外,对于Java,我有64位的Java。
I tried changing JRE folder and putting there things for JRE 64 bit because Jenkins installs 32bit but it doesn't work. 我尝试更改JRE文件夹,并为JRE 64位放置东西,因为Jenkins安装了32位,但是它不起作用。 How could I solve this problem?
我该如何解决这个问题?
java -Dhttp.proxyHost=THE_PROXY_HOST_NAME -Dhttp.proxyPort=PORT_NUMBER -Dhttp.proxyUser=USER_NAME -Dhttp.proxyPassword=MY_SUPER_SECRET_PASSWORD -Dhttp.auth.preference=basic -Djdk.http.auth.tunneling.disabledSchemes= -jar jenkins.war
Hopefully you've figured it out by now, but for those looking for an answer (myself in the near future)... 希望您现在已经解决了,但是对于那些寻求答案的人(我自己在不久的将来)...
I did a lot of things and I'm not sure what really ended up working, but here's what I think worked for me and what I actually did. 我做了很多事情,我不确定什么最终能奏效,但这就是我认为对我有用的,以及我实际上所做的。
Jenkins has known bugs with proxy settings from JENKINS-58567 , JENKINS-56498 , JENKINS-48775 , etc. So here's what I think works: 詹金斯(Jenkins)从JENKINS-58567 , JENKINS-56498 , JENKINS-48775等代理设置中已知错误。因此,我认为这是可行的:
Depending on how you're running Jenkins (ie running java -jar jenkins.war
or as a daemon systemctl start jenkins.service
) you're going to have to supply the proxy configuration as a Java option. 根据您运行Jenkins的方式(即运行
java -jar jenkins.war
或作为守护程序systemctl start jenkins.service
),您将必须提供代理配置作为Java选项。
I'm running this as a daemon so I added my options in /etc/sysconfig/jenkins (I have no idea where this lives in Windows) under JENKINS_JAVA_OPTIONS and added the following java options: 我跑这是一个守护进程,所以我说我的选择在/ etc / SYSCONFIG /詹金斯 (我不知道这个地方居住在Windows)JENKINS_JAVA_OPTIONS下,并添加以下Java选项:
-Dhttp.proxyHost=THE_PROXY_HOST_NAME -Dhttp.proxyPort=PORT_NUMBER -Dhttp.proxyUser=USER_NAME -Dhttp.proxyPassword=MY_SUPER_SECRET_PASSWORD -Dhttp.auth.preference=basic -Djdk.http.auth.tunneling.disabledSchemes=
I'm guessing that I can probably do -Djdk.http.auth.tunneling.disabledSchemes=Basic
instead of Dhttp.auth.preference=basic -Djdk.http.auth.tunneling.disabledSchemes=
based on this posted comment , but I'm lazy and don't feel like testing this out (I'll come back to refine this answer someday). 我猜想我可以根据此发布的注释执行
-Djdk.http.auth.tunneling.disabledSchemes=Basic
而不是Dhttp.auth.preference=basic -Djdk.http.auth.tunneling.disabledSchemes=
,但是我是太懒了,不想测试这个问题(有一天我会回来完善这个答案)。
Apart from the aforementioned steps, I did some weird things (I was pretty desperate, I had gone 4 months without updating plugins). 除了上述步骤之外,我还做了一些奇怪的事情(我非常绝望,我已经4个月没有更新插件了)。
export HTTP_PROXY=http://username:password@your-proxy-server:port
HTTP_PROXY
and value http://username:password@your-proxy-server:port
HTTP_PROXY
和值http://username:password@your-proxy-server:port
I can't remember what else I ended up doing, but I don't think they're important (since they didn't work). 我不记得我最后要做什么,但是我不认为它们很重要(因为它们没有用)。
Best of luck! 祝你好运!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.