请遵循以下说明:
https://docs.microsoft.com/en-us/azure/devops/release-notes/2020/pipelines/sprint-170-update
具备以下条件:
packages: - package: MyPkg type: NuGet connection: github name: TheOrg/TheRepo/ThePkg version: '*'
- getPackage: MyPkg
Azure管道似乎一点也不正确。我不知道这是怎么通过基本测试的。
日志显示:
Using authentication information for the following URI: https://nuget.pkg.github.com/{ThePATUser}/index.json
那就错了…我指定了一个组织。生成PAT的用户不是我试图使用的NuGet提要
然后
"C:\Program Files\dotnet\dotnet.exe" add d:\a\1\Nuget\dotnet\tempCsproj_67.csproj package TheRepo -v * -n
这显然也是错误的。这个功能真的有用吗?
我查看了任务的源代码: https://github.com/microsoft/azure-pipelines-tasks/pull/12292/files#diff-6aadc4d5fa0b434a99fe35ba9d3d2ac4R55
据我所知,这是一个糟糕的逻辑。希望微软的人能确认此代码确实不起作用。
我可以复制同样的问题。使用检索github包失败 getPackage 步骤。提要url的计算结果是PAT用户提要url,而不是组织提要url。
getPackage
你可以点击 this link