如何针对 Kerberos 跳过 Git 的密码输入?

How to skip password typing for Git against Kerberos?

我从 TFS git 克隆有问题。客户端是 Ubuntu 14.04, TFS 证书可用,因为 https 可以正常工作。 Git 和全局环境中未设置代理。

工作场景:

A. git clone https://url.to.my.tfs/       
B. git clone https://user@url.to.my.tfs/  

一个。请求用户名和密码,输入它们,一切顺利。
B. Git 不要求输入密码。克隆进展顺利。所以通信linux(git)-kerberos(TFS)已经OK了

修改 A.) 当 git 请求用户名和密码时按下 Enter 我得到:

fatal: Authentication failed for https://url.to.my.tfs

那么,问题出在哪里呢?如何跳过密码输入?

fatal: Authentication failed for... 正是因为您在请求时没有输入 user/pass。

git clone https://user@url.to.my.tfs/ 并且 Git 没有密码请求可能是因为 Git credential.helper HTTPS 协议上使用了缓存。 https://git-scm.com/book/gr/v2/Git-Tools-Credential-Storage

这个已回答的问题与 Github 上的 HTTPS 有关,但它也适用于您的场景。 在那里你可以找到最适合你的选项。