gpt4 book ai didi

git - 如何在 visualstudio.com 的命令行上输入 git 凭据?

转载 作者:太空狗 更新时间:2023-10-29 13:42:55 27 4
gpt4 key购买 nike

我尝试访问托管在 VS Team Services 上的我的 git 存储库。在 Visual Studio 中工作正常,但我需要使用标准 git 客户端从命令行访问。

当我尝试执行诸如 pull 之类的命令时,系统会要求我提供凭据。现在我的问题是我的凭据是我的 MSDN 帐户数据,使用我的电子邮件和密码。

当我在 git 命令行中输入我的电子邮件后,我可以看到它试图构建一个无法工作的密码 url,因为地址中有两个“@”:

git clone https://myproject.visualstudio.com/DefaultCollection/_git/coderepo
Username for 'https://myproject...': myself@mydomain.com
Password for 'https://myself@mydomain.com@myproject...' :

输入密码后,我收到(毫不奇怪)“严重:身份验证失败”

那么:我如何在 git 中使用电子邮件作为用户名凭据?

最佳答案

我自己找到了解决方案。

在 VS 团队服务中,在 https://[projectname]mydea.visualstudio.com/_details/security/altcreds

可以使用真实用户名(无电子邮件)输入“备用身份验证凭据”

alternate credentials VS Team Services

关于git - 如何在 visualstudio.com 的命令行上输入 git 凭据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35150078/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com