gpt4 book ai didi

visual-studio - 在 Visual Studio 中为 Azure Nuget 源添加凭据

转载 作者:行者123 更新时间:2023-12-02 01:35:58 25 4
gpt4 key购买 nike

我正在将我现有的项目转移到一台新机器上。我正在使用自定义 Azure Nuget 提要,其 url 格式为:

https://pkgs.dev.azure.com/company/project/_packaging/project.Libs/nuget/v3/index.json

当我尝试构建时,出现错误:

NU1301: Unable to load the service index for sourcehttps://pkgs.dev.azure.com/company/project/_packaging/project.Libs/nuget/v3/index.jsonResponse status code does not indicate success: 401 (Unauthorized).

我也无法浏览提要中的包。

我在我的浏览器中登录并且可以看到 feed 的 json 文件的内容,但当然不是在私有(private) session 中。

在我的旧机器上,我不记得提要是如何添加的,我也没有在任何地方保存我的用户名/密码(例如,在 NuGet.config 中,这似乎是一个建议的解决方案)。

有谁知道如何向 VS 提供凭据以便它可以访问提要?

最佳答案

我能够通过以下方式解决此问题:

  • 退出 Visual Studio(右上角)
  • 创建一个新项目并从我的 Azure 工件的 URL 添加一个新的 Nuget 提要
  • Nuget 要求我再次登录,我一直在使用的帐户列在那里。我没有选择它,但说“使用另一个帐户”
  • 我再次使用同一帐户登录,提供用户名、密码和双因素身份验证

现在一切正常。

关于visual-studio - 在 Visual Studio 中为 Azure Nuget 源添加凭据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72395187/

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