【发布时间】:2019-11-08 05:25:14
【问题描述】:
Azure Artifacts 包可以公开使用吗?如果是这样,我想将 NuGet 包从 PR 发布到我的 GitHub project。我目前从 PR 构建中收到以下权限错误:
[警告]Warning_SessionCreationFailed {"statusCode":500,"result":{"$id":"1","innerException":null,"message":"用户 '89e4e6df-0ac0-471f-ba63-0270050c3b79' 缺少完成权限 这个动作。你需要有 'ReadPackages'。","typeName":"Microsoft.VisualStudio.Services.Feed.WebApi.FeedNeedsPermissionsException, Microsoft.VisualStudio.Services.Feed.WebApi","typeKey":"FeedNeedsPermissionsException","errorCode":0,"eventId":3000}} [错误]错误:进程“/usr/bin/dotnet”失败,退出代码为 1 [error]包发布失败
我正在使用azure-pipelines.yml 文件。这是我的 Azure Pipelines 构建的 link。
更新 1
这些是我已经添加到我的提要中的用户/组:
这些是我可以添加到我的提要中的用户/组,我还没有这样做:
更新 2
这是我用来发布 NuGet 包的 Azure Pipelines 任务的 yaml:
- task: DotNetCoreCLI@2
displayName: 'Dotnet NuGet Push'
inputs:
command: push
nuGetFeedType: internal
packagesToPush: '/home/vsts/work/1/Windows/*.nupkg'
publishVstsFeed: schema-net
【问题讨论】:
-
在提要设置中检查“项目集合构建服务(用户名)”是否有权限
-
但是在 GitHub 上提交 PR 的用户可以是任何人。
-
但是buid运行的是特殊用户,而不是触发PR的用户
标签: github azure-devops nuget azure-artifacts