azure - 如何在 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 的到期日期。我在那个帖子中没有太多的声誉可以发表评论,所以我不得不创建一个新帖子。
解决方案
对于这种情况下的密码,我相信这意味着 PAT 或个人访问令牌。对于生成该令牌的任何用户,作为 Azure Devops 中的该用户,单击用户设置 -> 个人访问令牌。然后找到所需的令牌并单击编辑,然后选择新的所需到期日期。
更新:确保在此处定义的 yaml 管道定义中添加 nuget 身份验证任务。
推荐阅读
- lxml - openpyxl 无法处理写入 lxml.etree._ElementUnicodeResult
- python - 如何在 Tensorflow 2.0 中做 Cohen Kappa 二次损失?
- php - 类 DateInterval 的对象无法在 php 中转换为字符串
- kubernetes - 使用 BitBucket 将 nodejs 应用程序导出到 Kubernetes
- c++ - 了解 OpenGL 中的绑定?
- .htaccess - 防止盗链在我的网站上不起作用吗?
- angular - 如何在角度的 *ngFor 列表的每个项目中切换特定元素的类?
- reactjs - 如何将 react-phone-number-input 与 Formik 的 Field 组件一起使用
- c++ - 在 Catch2 中指定外部文本文件路径的最佳方法
- kendo-ui - kendoMultiSelect 和 kendoGrid 行加法