缓存git-tf的TFS登录凭据 [英] Cache TFS login credentials for git-tf

查看:168
本文介绍了缓存git-tf的TFS登录凭据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在工作中使用git和git-tf,但是每次使用git-tf执行任何命令时,我都必须输入登录凭据.有没有办法为git-tf缓存我的TFS登录凭据,这样我就不必每次都输入它们了?

I use git and git-tf at my job, but every time I perform any command with git-tf I have to enter my login credentials. Is there a way to cache my TFS login credentials for git-tf so I won't have to enter them every time?

推荐答案

如果您使用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.

这篇关于缓存git-tf的TFS登录凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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