【发布时间】:2015-11-18 09:51:36
【问题描述】:
我正在使用 Visual Studio Online - 包管理器预览版以及新的构建系统。包管理器预览添加了许多构建步骤,包括“NuGet Publisher”步骤,该步骤应将包推送到 Visual Studio Online 托管的私有源。
现在是documentation is a little out of step here。 documentation on auth 和 personal access tokens 也是如此。有一些迹象表明,只要您设置了权限(构建服务帐户对服务端点和包管理器扩展具有权限),就不需要在 VSO 和包管理器之间进行身份验证。实际的构建步骤要求您从服务端点列表中进行选择,这就是我所尝试的。
当我在服务端点上没有放置凭据时,我收到错误:
Server Key must be set, set the password on the generic service
当我尝试将 API 密钥放在服务端点上时,它似乎在保存时被丢弃......并且错误变为:
2015-11-18T08:35:24.5678951Z Invoking nuget with push C:\a\1\s\EventViewer\bin\Release\Project.Name.1.1.12.0.nupkg -s https://example.pkgs.visualstudio.com/DefaultCollection/_packaging/example/nuget/v3/index.json usfusmx4ez6mlfqwpp2abzc7e37denfcp7bxsep2hqij3tp4qwvq on C:\a\1\s\EventViewer\bin\Release\Project.Name.1.1.12.0.nupkg
2015-11-18T08:35:24.5688946Z C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\agent\worker\tools\NuGet.exe push C:\a\1\s\EventViewer\bin\Release\Project.Name.1.1.12.0.nupkg -s https://example.pkgs.visualstudio.com/DefaultCollection/_packaging/Example/nuget/v3/index.json usfusmx4ez6mlfqwpp2abzc7e37denfcp7bxsep2hqij3tp4qwvq
2015-11-18T08:35:25.3467312Z Please provide credentials for: https://example.pkgs.visualstudio.com/DefaultCollection/_packaging/Example/nuget/v3/index.json
2015-11-18T08:35:25.3667189Z ##[error]Object reference not set to an instance of an object.
2015-11-18T08:35:25.3677179Z UserName: Password:
2015-11-18T08:35:25.4647059Z ##[error]Unexpected exit code 1 returned from tool NuGet.exe
我也尝试过使用个人访问令牌,但无济于事。
如何使发布步骤正常工作?
【问题讨论】:
-
我认为我的问题是“项目构建服务”没有对提要的权限。坏消息是自动完成功能只显示前 20 个结果,而我需要的 GUID 不在前 20 个中(从该列表中添加一些并不会阻止它们显示)。
-
您的第一个文档链接已过期 - 入口点现在是 visualstudio.com/get-started/package/what-is-packaging。另外,关于 20 个身份的问题,我们有一个错误跟踪。
标签: azure-devops azure-pipelines azure-artifacts