azure - 如何在 Azure DevOps 中更新密码的到期日期

标签 azure azure-devops nuget

在 Azure 构建管道中运行 UnitTest 项目时。我收到以下错误:

Restoring NuGet package Microsoft.Portal.TestFramework.UnitTest.6.672.0.5.
  GET https://msazure.pkgs.visualstudio.com/_packaging/ae95f9fe-9452-4aa1-b167-92a7fcfc670f/nuget/v3/flat2/microsoft.portal.testframework.unittest/6.672.0.5/microsoft.portal.testframework.unittest.6.672.0.5.nupkg
  GET https://msazure.pkgs.visualstudio.com/_packaging/d387a8da-063b-4a96-afb8-093924314a98/nuget/v3/flat2/microsoft.portal.testframework.unittest/6.672.0.5/microsoft.portal.testframework.unittest.6.672.0.5.nupkg
  GET https://msazure.pkgs.visualstudio.com/_packaging/ab5b6ade-9b91-4eb5-8dc6-eacc4a5cdda7/nuget/v3/flat2/microsoft.portal.testframework.unittest/6.672.0.5/microsoft.portal.testframework.unittest.6.672.0.5.nupkg
MSBuild auto-detection: using msbuild version '16.8.2.56705' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin'.
  GET https://api.nuget.org/v3-flatcontainer/microsoft.portal.testframework.unittest/6.672.0.5/microsoft.portal.testframework.unittest.6.672.0.5.nupkg
  NotFound https://api.nuget.org/v3-flatcontainer/microsoft.portal.testframework.unittest/6.672.0.5/microsoft.portal.testframework.unittest.6.672.0.5.nupkg 57ms
    [CredentialProvider]Using the ADAL UI  flow for uri https://msazure.pkgs.visualstudio.com/_packaging/Toolset/nuget/v3/index.json. User sign-in required in a pop-up authentication window.

它指出需要身份验证。

根据这篇文章How to pass Azure Auth when Deploying NuGet Package via Nuke.Common/NuGet.CommandLine建议的解决方案是“更新密码 DevOps 的到期日期”。

谁能告诉我如何更新 Azure DevOps 上的到期日期。 我没有太多声誉来发表评论,所以我不得不创建一个新帖子。

最佳答案

对于这种情况下的密码,我认为这意味着 PAT 或个人访问 token 。对于生成该 token 的用户,作为 Azure Devops 中的该用户,单击“用户设置”->“个人访问 token ”。然后找到所需的 token 并单击编辑,然后选择新的所需到期日期。

更新:确保在定义的 yaml 管道定义中添加 nuget 身份验证任务 here .

关于azure - 如何在 Azure DevOps 中更新密码的到期日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65410425/

相关文章:

sql-server - 如何在没有配置外部表权限的情况下加入多个azure数据库?

azure - "duplicate"/"copy"Azure 数据流中的某些行可以执行什么任务?

c# - Visual Studio 的删除未使用的引用安全吗?

c# - 负载包含具有相同目标路径的文件

node.js - 微软bot框架网络聊天直连隐藏 secret ——NODE JS

c# - 在已发布的应用程序中上传到 Blob 存储时出现 IOException

Azure DevOps 发布管道权限

git - 工作项、 pull 请求菜单在 Visual Studio 中不可见

c# - MVC 5 构建在 Visual Studio Team Services 上失败

powershell - 请提供凭据错误推送到 Azure DevOps