GIT致命错误:Visual Studio中的身份验证失败 [英] GIT Fatal error: Authentication failed in Visual Studio

查看:756
本文介绍了GIT致命错误:Visual Studio中的身份验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从今天开始,当我尝试将git命令与Azure-DevOps中的存储库一起使用时出现错误.这些存储库位于DevOps上的一个项目中,我可以使用同一帐户访问该项目,并且没有任何迹象表明最近对其进行了更改.我可以采取的步骤来复制它:

As of today I'm getting errors when trying to use git commands with my repository in Azure-DevOps. The repositories sit in a project on DevOps that I can access with the same account and shows no sign of any recent changes to it. The steps I can take to reproduce it is:

  1. 打开命令提示符并输入git fetch
  2. 出现一个窗口,提示您登录
  3. 我点击了帐户
  4. 未提示输入密码,但收到一封电子邮件,提示您已创建了PAT
  5. 命令提示符产生错误
  1. Open the command prompt and enter git fetch
  2. A window appears prompting for a login
  3. I click the account
  4. No password is prompted, but an e-mail arrives that a PAT has been created
  5. The command prompt yields an error

错误:

fatal: Authentication failed for `<link to repository>`

到目前为止我已经尝试过的事情:

Things I've tried so far:

  • 重新启动PC
  • 退出Visual Studio
  • 并登录
  • 删除.IdentityService文件夹
  • 卸下和安装GIT
  • Visual Studio Installer
  • 中卸下和安装GIT For Windows
  • 删除缓存文件夹%LOCALAPPDATA%\Microsoft\Team Foundation\7.0\Cache
  • 删除缓存文件夹%LOCALAPPDATA%\Microsoft\Team Foundation\8.0\Cache
  • Credential Manager
  • 中删除GITVS
  • 在网上发现了很多其他解决方法",但都没有解决我的问题
  • Restarting PC
  • Signing out and in on Visual Studio
  • Removing the .IdentityService folder
  • Removing and installing GIT
  • Removing and installing GIT For Windows in the Visual Studio Installer
  • Removing the cache folder %LOCALAPPDATA%\Microsoft\Team Foundation\7.0\Cache
  • Removing the cache folder %LOCALAPPDATA%\Microsoft\Team Foundation\8.0\Cache
  • Removing GIT and VS keys from the Credential Manager
  • Quite a few other things 'fixes' found online that did not solve my issue

当前正在运行:

  • GIT 2.21.0-64位
  • Visual Studio 2019

我尝试将Visual Studio CodeAzure Repos 1.149.2扩展名一起使用,并得到相同的错误.它使我产生一个Microsoft页面,该页面用于输入我授予的设备登录代码,但使用git命令会给出相同的错误消息.

I've attempted using Visual Studio Code with the Azure Repos 1.149.2 extension and get the same error. It yields me the Microsoft page to enter my code for device login which it grants, but using git commands give me the same error messages.

我还从Azure DevOps环境中删除了我的个人资料,并重新添加了我的个人资料,但没有成功.

I've also had my profile removed from the Azure DevOps environment and re-added without success.

推荐答案

在我的特殊情况下,与Microsoft多次来回邮件后,发现我的两个帐户以某种方式开始彼此冲突,从而导致奇怪的错误.一个很好的例子是,在DevOps中对Wiki进行更改将在提交试用中显示与我登录的帐户不同的帐户.

In my particular case after many mails back and forth with Microsoft it turned out that two of my accounts somehow started conflicting with eachother causing weird errors. A nice example was that making changes to a wiki in DevOps would show a different account in the commit trial than the account I was logged into.

最终Microsoft设法修复了它,此后我再也没有任何问题.

In the end Microsoft managed to fix it and I haven't had any issues since.

这篇关于GIT致命错误:Visual Studio中的身份验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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