0

这可能每 2 周发生一次,但最近它发生了几次,直到构建成功一次。

获取https://api.nuget.org/v3-flatcontainer/xamarin.uitest/3.0.9/xamarin.uitest.3.0.9.nupkg ##[错误]C:\Program Files (x86)\Microsoft Visual Studio\ 2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(128,5):错误:[CredentialProvider]设备流认证失败。向用户展示了设备流程,但在 90 秒内未做出反应。

----- 更新---- 在进一步挖掘日志后,我发现这是由于对私人提要的 401(未经授权)访问(与管道失败的项目在同一组织中)。一个临时解决方案是从解决方案构建配置中删除需要此私有提要的特定 *.csproj,并从管道中删除私有提要。这使管道再次工作。

----更多管道信息----我不能在这里发布整个代码。

pool:
  vmImage: 'windows-latest'

variables:
  configuration: NugetB

steps:
- task: MSBuild
  displayName: 'MSBuild'
  inputs:
    solution: '**\xxSolutionxx.sln'
    msbuildArchitecture: 'x64'
    configuration: '$(configuration)'
    msbuildArguments: '/t:restore;build;pack /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:RestoreAdditionalProjectSources=https://urlToPrivateFeedInTheSameOrganization /p:configuration=$(configuration) /p:NuGetInteractive="true"'
4

1 回答 1

1

Azure 构建管道偶发错误,[CredentialProvider]设备流身份验证失败

如果您对管道中的 azure ariftact 提要具有任务/脚本访问权限,请尝试使用该System.AccessToken变量对私有 Azure Artifacts 提要的管道进行身份验证,或尝试重置您的 PAT。

您可以查看此文档以获取更多详细信息。

此外,如果以上没有解决您的问题,请分享您是如何访问工件和构建管道配置的。

于 2020-11-16T07:21:53.243 回答