wget 透過虛擬盒中的代理程式(cloudera 快速啟動 VM - Cent OS)

wget 透過虛擬盒中的代理程式(cloudera 快速啟動 VM - Cent OS)

我已經安裝了在 Windows 7 虛擬機器上運行的 Cloudera Quickstart VM 5.3.0,我想執行命令wget,但我的公司代理程式出現問題(需要身份驗證)。

我知道這是一個常見問題,並且已經有很多關於它的問題,我已經閱讀過這些問題,但我仍然不明白為什麼這不起作用,我希望你能幫助我。

我在 /etc/wgetrc 檔案中設定代理設定:

https_proxy = http://myProxyServer:8080/
http_proxy = http://myProxyServer:8080/
ftp_proxy = http://myProxyServer:8080/

proxy_user = user
proxy_password = password

use_proxy = on

我讓其他行評論。

但是當我嘗試測試 wget 時出現以下錯誤:

$ wget http://www.debian.org/Pics/debian.png
--2015-07-16 05:36:48--  http://www.debian.org/Pics/debian.png
Resolving xxxx, ...
Connecting to xxxx... connected.
Proxy request sent, awaiting response... 407 Proxy Authentication Required
2015-07-16 05:36:48 ERROR 407: Proxy Authentication Required.

如果我不設定使用者或密碼,也會出現相同的錯誤。

當我執行時env | grep proxy沒有返回任何內容,所以我也嘗試過export http_proxy="http://user:password@myProxyServer:8080/",但仍然有與上面相同的錯誤。

請注意,我的密碼中有特殊字符,例如“&”後跟“0”,我將其替換為十六進制編碼:“...%26%30...”

我無法理解為什麼在所有設定之後它會失敗(而且我確信設定中沒有拼字錯誤)。

任何幫助將不勝感激! :)

我不知道這是否相關,但有一些精確度: _ Cloudera Quickstart VM 是使用 CentOS 6.4 建立的 _ 虛擬盒中的虛擬適配器配置為 NAT。 _ 我在常規虛擬框設定中設定了代理並指示 Firefox 使用代理:透過 Firefox 的網路連線有效。

編輯 :

正如建議的那樣,我也嘗試過 /etc/wgetrc 和 ~/.wgetrc 但不幸的是它仍然不起作用。

我做了更多研究,我發現它可能會失敗,因為我的代理人使用 NTLM 驗證,就是這種情況。當我跑步時wget http://www.debian.org/Pics/debian.png -v -d 我得到了HTTP/1.0 407 Proxy Authentication Required Proxy-Authenticate: NEGOTIATE Proxy-Authenticate: NTLM

根據我找到的網站,我應該用 ntlmaps 解決我的問題,但現在我的問題是,當我運行時我無法安裝它,sudo yum install ntlmaps我有另一個錯誤:(而且我不明白在教程中他如何安裝它代理問題)。

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base`

相關內容