且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

缓存git-tf的TFS登录凭据

更新时间:2023-12-04 18:11:58

如果您使用Kerberos并与TFS服务器所在的Active Directory域具有信任关系,则无需输入任何密码,git-tf将使用您的Kerberos票证进行身份验证.当然,这仅适用于本地服务器.不适用于Team Foundation Service.

If you use Kerberos and have a trust relationship with the Active Directory domain that your TFS server is on, you need not enter any password, git-tf will use your Kerberos ticket to authenticate. This, of course, will only work with on-premises servers; it will not work with Team Foundation Service.

要为存储库缓存用户名和密码,可以在.git/config中设置它们:

To cache your username and password for the repository, you can set these in your .git/config:

git config git-tf.server.username myusername
git config git-tf.server.password mypassword

但是,请注意,这会将您的密码存储在纯文本中,这就是为什么首选Kerberos的原因.我有兴趣添加对git凭据存储机制的支持,但这还不存在.

However, do note that this will store your password in plain text, which is why Kerberos is preferred. I am interested in adding support for the git credential storage mechanisms, but this does not yet exist.