I am trying to use pip behind a proxy at work.
(我正在尝试在工作中使用代理后面的点子。)
One of the answers from this post suggested using CNTLM .
(这篇文章的答案之一是建议使用CNTLM 。)
I installed and configured it per this other post , but running cntlm.exe -c cntlm.ini -I -M http://google.com
gave the error Connection to proxy failed, bailing out
. (我已根据另 cntlm.exe -c cntlm.ini -I -M http://google.com
文章进行了安装和配置,但是运行cntlm.exe -c cntlm.ini -I -M http://google.com
出现错误,导致Connection to proxy failed, bailing out
。)
I also tried pip install -–proxy=user:pass@localhost:3128
(the default CNTLM port) but that raised Cannot fetch index base URL http://pypi.python.org/simple/
.
(我还尝试了pip install -–proxy=user:pass@localhost:3128
(默认的CNTLM端口),但提出了Cannot fetch index base URL http://pypi.python.org/simple/
。)
Clearly something's up with the proxy. (显然,代理出现了问题。)
Does anyone know how to check more definitively whether CNTLM is set up right, or if there's another way around this altogether?
(有谁知道如何更明确地检查CNTLM是否设置正确,或者是否还有其他方法可以完全解决这一问题?)
I know you can also set the http_proxy
environment variable as described here but I'm not sure what credentials to put in. The ones from cntlm.ini
? (我知道您也可以按此处所述设置http_proxy
环境变量,但是我不确定要放入什么凭据cntlm.ini
?)
ask by Rob translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…