我使用HTTP代理在公司Windows网络(我登录)上工作.当我使用Internet Explorer时,它神奇地使用代理而无需输入我的密码.某些其他程序似乎也管理这个,就像JavaWebStart有一个"使用浏览器设置"选项.
然而,当我使用脚本/像卷曲或wget的方案,从http取东西,或者我的Java代码我似乎需要有地方存储我的密码,这显然不是最好的安全范围内做到这一点.
如何以编程方式获得Internet Explorer所具有的无密码访问权限?
我主张这是一个堆栈溢出的问题,因为我是一个程序员,我需要我的程序/脚本,而无需在输入密码的工作,虽然我可以看到,别人可能会认为它属于在服务器故障/超级用户.
我知道像curl中的--proxy-ntlm这样的设置,但是这仍然需要一个ntlm用户名和密码.
我试过用export http_proxy=http://[username]:[pwd]@[proxy]和git config --global http.proxy http://[username]:[pwd]@[proxy].
我无法让它发挥作用.看起来git使用Basic身份验证:
Initialized empty Git repository in /home/.../.git/
* Couldn't find host github.com in the .netrc file, using defaults
* About to connect() to github.com port 8080 (#0)
* Trying 10.... * Connected to github.com (10....) port 8080 (#0)
* Proxy auth using Basic with user '...'
> GET http://github.com/sunlightlabs/fiftystates.git/info/refs HTTP/1.1
Proxy-Authorization: Basic MD...
User-Agent: git/1.6.1.2
Host: github.com
Pragma: no-cache
Accept: */*
Proxy-Connection: Keep-Alive
< HTTP/1.1 407 Proxy Authentication Required ( …Run Code Online (Sandbox Code Playgroud) 像许多人一样,我试图从公司代理的后面访问github.com.
显然*curl(通过libcurl)现在包括对NTLM代理身份验证的GSSAPI支持,而无需手动泄露用户名和密码.
由于git客户端使用libcurl,我认为这可以通过git访问.
如何使用git客户端访问它?
(*)请参见没有密码的NTLM代理?,讨论ntlm代理身份验证而不提供密码.