【发布时间】:2021-03-17 23:14:16
【问题描述】:
要发布到外部 NuGet 源,您必须首先创建一个服务连接以指向该源....
然后它提供这个 YAML:
- task: NuGetAuthenticate@0
inputs:
nuGetServiceConnections: '<Name of the NuGet service connection>'
- task: NuGetCommand@2
inputs:
command: push
nuGetFeedType: external
versioningScheme: byEnvVar
versionEnvVar: <VersionVariableName>
这失败了
“错误:'https://api.nuget.org/v3/index.json' 的服务连接无效。此任务不支持 ApiKey 服务连接。请改用 -ApiKey (NuGet) 或调用工具本身时 --api-key (dotnet)。有关详细信息,请参阅任务文档。"
我使用我的 ApiKey 创建了一个指向 nuget.org 的服务连接。
我不理解这部分错误消息:“在调用工具本身时,请使用 -ApiKey (NuGet) 或 --api-key (dotnet)。有关更多详细信息,请参阅任务文档。”
我还看到了this question,它指的是一个已经实施的缺陷。
编辑:原来上面提到的缺陷是一个红鲱鱼。真正的问题是 nuget 的限制,在撰写本文时仍然存在。
【问题讨论】:
标签: nuget azure-pipelines azure-pipelines-yaml