问题
Like many, Im trying to access github.com from behind a corporate proxy.
Apparently* curl (via libcurl) now includes GSSAPI support for NTLM proxy authentication without having to manually divulge username and password.
Since git client uses libcurl, I assume this is accessible via git.
How do I access this using git client ?
(*) See NTLM proxy without password?, for a discussion of ntlm proxy authentication without providing the password.
See also Using Libcurl to authenticate ntlm proxy without pass.
回答1:
In the end I had to RTFS, the answer in summary:
As at msysgit version 1.9.5 (earlier versions are untested), git
- uses the proxy configuration for [http] section for both http and https
- does NOT have an explicit way to set authentication type (such as ntlm)
- does NOT have a separate way to set username and password other than embedded in the proxy url
using an empty username and password works, so it will use default NTLM credentials if you do the following
git config --global http.proxy
https://:@proxyhost:proxyport/
Note that the :
and @
that delimit the username and password are present, but the fields are empty. And it seems to accept using https to connect to proxy.
来源:https://stackoverflow.com/questions/29338620/git-client-using-gssapi-for-ntlm-proxy-authentication