使用 GSSAPI 进行 NTLM 代理身份验证的 git 客户端 [英] git client using GSSAPI for NTLM proxy authentication

查看:35
本文介绍了使用 GSSAPI 进行 NTLM 代理身份验证的 git 客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

像许多人一样,我试图从公司代理后面访问 github.com.

Like many, Im trying to access github.com from behind a corporate proxy.

显然* curl(通过 libcurl)现在包括对 NTLM 代理身份验证的 GSSAPI 支持,而无需手动泄露用户名和密码.

Apparently* curl (via libcurl) now includes GSSAPI support for NTLM proxy authentication without having to manually divulge username and password.

由于 git 客户端使用 libcurl,因此我认为可以通过 git 访问.

Since git client uses libcurl, I assume this is accessible via git.

我如何使用 git 客户端访问它?

How do I access this using git client ?

(*) 参见 没有密码的 NTLM 代理?,关于 ntlm 代理身份验证的讨论无需提供密码.

(*) See NTLM proxy without password?, for a discussion of ntlm proxy authentication without providing the password.

另请参阅使用 Libcurl 无需通过验证 ntlm 代理.

推荐答案

最后不得不RTFS,答案总结:

In the end I had to RTFS, the answer in summary:

在 msysgit 1.9.5 版(早期版本未经测试),git

As at msysgit version 1.9.5 (earlier versions are untested), git

  1. 对 http 和 https 使用 [http] 部分的代理配置
  2. 没有明确的方式来设置身份验证类型(例如 ntlm)
  3. 除了嵌入在代理 url 中之外,没有单独的方法来设置用户名和密码
  4. 使用空用户名和密码有效,因此如果您执行以下操作,它将使用默认的 NTLM 凭据

  1. uses the proxy configuration for [http] section for both http and https
  2. does NOT have an explicit way to set authentication type (such as ntlm)
  3. does NOT have a separate way to set username and password other than embedded in the proxy url
  4. 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/

git config --global http.proxy https://:@proxyhost:proxyport/

请注意,分隔用户名和密码的 :@ 存在,但字段为空.并且它似乎接受使用 https 连接到代理.

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.

这篇关于使用 GSSAPI 进行 NTLM 代理身份验证的 git 客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆