首页 > 解决方案 > 如何在 Azure DevOps 中更新密码的到期日期

问题描述

在 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 的到期日期。我在那个帖子中没有太多的声誉可以发表评论,所以我不得不创建一个新帖子。

标签: azureazure-devopsnuget

解决方案


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

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


推荐阅读