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

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

问题描述

截至今天,我在 Azure-DevOps 中尝试对我的存储库使用 git 命令时遇到错误.这些存储库位于 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. 命令提示符产生错误

错误:

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

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

Things I've tried so far:

  • 重启电脑
  • Visual Studio
  • 上注销和登录
  • 删除 .IdentityService 文件夹
  • 删除和安装GIT
  • Visual Studio Installer
  • 中删除和安装 GIT For Windows
  • 删除缓存文件夹%LOCALAPPDATA%MicrosoftTeam Foundation7.0Cache
  • 删除缓存文件夹%LOCALAPPDATA%MicrosoftTeam Foundation8.0Cache
  • Credential Manager
  • 中删除 GITVS
  • 在网上发现的许多其他修复"问题都没有解决我的问题

目前正在运行:

  • 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.

最后微软设法修复了它,从那以后我没有遇到任何问题.

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

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

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