Visual Studio 连接到 DevOps 项目时遇到 403 错误

Visual Studio Encounters 403 Error Connecting to DevOps Project

我的一位开发人员在尝试连接到我们的一个 DevOps 项目时收到来自 Visual Studio 2017 Enterprise 的以下消息,我们已经尝试了我们能想到的一切以及通过搜索找到的一切Stack Overflow 和互联网一般都不起作用。

这是来自 Visual Studio 的错误:

We could not add the account
The browser based authentication dialog failed to complete. Reason:
The server understood the request, but is refusing to fulfill it.

我们的尝试

  1. 正在删除位于 %userprofile%\AppData\Local\Microsoft

  2. 中的文件夹 Team Foundation、VisualStudio、VisualStudio Services、VSCommon 和 vshub
  3. 正在从 Windows 凭据管理器中删除所有内容。

  4. 正在通过浏览器进行身份验证(成功)。

存储库位于 dev.azure.com。

据我了解,这是一个 HTTP 403 错误,表示用户已成功通过身份验证,只是他们无权查看所请求的资源。 DevOps 中的权限与没有任何问题的其他用户相同。我们有 1 个开发人员组,如果您在该组中,您将拥有所有必要的权限,因此我相信他们的权限与其他没有任何问题的开发人员的权限相同。

我想我明白这个错误对一般网站意味着什么,但是我似乎对 Visual Studio 或 Azure DevOps 希望我们专门做些什么来减轻这个错误感到茫然。

The browser based authentication dialog failed to complete.

曾经是旧 VS2015 和 VS2017 中的已知问题,但我无法在最新的 VS2017 15.9.23 上重现它。您可以按照以下提示来解决该问题:

1.Update VS2017 到最新的 15.9.23 版本。

2.Navigate到VS安装路径C:\Program Files (x86)\Microsoft Visual Studio17\VsEdition\Common7\IDE和运行devenv.exe /resetsettingsdevenv.exe /resetuserdata重置VS设置和用户数据。来自 Joyce Lin.

3.Check 您的注册表设置并清空中国端点(如果存在)。检查 this one。现在尝试登录 VS...

4.If #3 后问题依旧,您可以:

Open Visual Studio
Click Help > Send Feedback > Report a problem
An instance of Visual Studio Feedback will open
Attempt to sign in using your MS account
If sign in is successful, check if you are signed into Visual Studio

来自 Nathan Timblin 的提示。

希望以上对你有所帮助:)