响应状态代码并不表示成功:403(禁止 - 用户)Azure Pipeline

Ale*_*ima 5 nuget

C:\hostedtoolcache\windows\dotnet\sdk\3.1.416\NuGet.targets(128,5): 
 error :   
   Response status code does not indicate success: 403 
     (Forbidden - User '2016d1a0-0d43-42b0-8a96-7f6a9bxxxxxx' lacks permission to complete this action. You need to have 'ReadPackages'. 
     (DevOps Activity ID: ADACCF88-4190-491C-B690-E3330E3xxxxx)). 
   [D:\a\1\s\Notifications.Functions\Notifications.Application.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:08.96


##[error]Error: The process 'C:\hostedtoolcache\windows\dotnet\dotnet.exe' failed with exit code 1
Run Code Online (Sandbox Code Playgroud)

Cra*_*own 7

如果生成服务无权访问 Azure Artifacts Feed,则会出现此错误消息。要解决此问题:

  1. 转到 Azure Artifacts 页面。
  2. 选择“源设置”按钮,然后选择“权限”选项卡。
  3. 选择添加用户/组。
  4. 在“用户/组”框中,键入[ProjectName] Build Service(其中[ProjectName]是包含您尝试从中推送的管道的 Azure DevOps 项目的名称),然后选择下拉列表中显示的相应组。
  5. 将角色设置为贡献者。然后选择保存。

现在,当您运行管道时,它将能够毫无问题地将 nuget 包推送到 Azure Artifacts 源。


Siv*_*san 1

检查提要是否具有“构建服务”的“贡献者”权限,如果已由 Azure 添加,则通常是“协作者”。