Lacks permission to complete Push nuget package via azure CICD

I am trying to create a NuGet package and publish it to an internal feed using an Azure CI/CD pipeline. Below are the details:

  • Organization name: devStierMate

  • Azure project name: Common'

  • Feed name: DemoFeed

For the pipeline

trigger: master

pool: default

steps:
  task: DotNetCoreCLI@2
    inputs:
      command: 'restore'
      projects: '**/Base.Domain.csproj'
      feedsToUse: 'select'
      vstsFeed: '2bcded40-dea3-4063-bae4-ec406ef556d8'

  task: DotNetCoreCLI@2
    inputs:
      command: 'build'
      projects: '**/Base.Domain.csproj'

  task: NuGetCommand@2
    inputs:
      command: 'pack'
        packagesToPack: '**/Base.Domain.csproj'
        versioningScheme: 'off'

  task: NuGetCommand@2
    inputs:
      command: 'restore'
        restoreSolution: '**/*.sln'
        feedsToUse: 'select'
        vstsFeed: 'b86d8ee2-12bf-409a-a614-679003bfb0fa'

  task: NuGetCommand@2
    inputs:
      command: 'push'
        packagesToPush: '$(Build.ArtifactStagingDirectory)//*.nupkg;!$(Build.ArtifactStagingDirectory)//*.symbols.nupkg'
        nuGetFeedType: 'internal'
        publishVstsFeed: 'b86d8ee2-12bf-409a-a614-679003bfb0fa'
        allowPackageConflicts: true

This gives the error

a következő helyen: VstsNuGetPush.CredentialSelector.TrySelectCredential[TResult](Func2 func, IVssCredentialStorage vssClientCredentialStorage, CredentialPromptType promptType, TResult& result)    a következő helyen: VstsNuGetPush.CredentialSelector.Select[TResult](Func2 func) a következő helyen: VstsNuGetPush.Patterns.Helpers.FactoryAdaptorChain2.Get()    a következő helyen: System.Lazy1.CreateValue() a következő helyen: System.Lazy1.LazyInitValue()    a következő helyen: VstsNuGetPush.VstsNuGetPushCommand.MainCore(ILogger logger)    a következő helyen: VstsNuGetPush.VstsNuGetPushCommand.Main() ##[error]Error: An unexpected error occurred while trying to push the package with VstsNuGetPush.exe. Exit code(1) and error(Error: Microsoft.VisualStudio.Services.Common.VssServiceException: User '6e5a7421-080a-4b76-a45e-37d24e6b9ab8' lacks permission to complete this action. You need to have 'ReadPackages'.    a következő helyen: Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() --- Verem vége nyomkövetés a kivétel előző előfordulási helyétől kezdve ---    a következő helyen: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    a következő helyen: System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    a következő helyen: Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() --- Verem vége nyomkövetés a kivétel előző előfordulási helyétől kezdve ---    a következő helyen: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    a következő helyen: System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    a következő helyen: VstsNuGetPush.NuGetServiceIndexHttpClient.<>c__DisplayClass2_0.<<GetServiceIndexAsync>b__0>d.MoveNext() --- Verem vége nyomkövetés a kivétel előző előfordulási helyétől kezdve ---    a következő helyen: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    a következő helyen: VstsNuGetPush.RetryHelper.<RetryOnExceptionHelperAsync>d__01.MoveNext() --- Verem vége nyomkövetés a kivétel előző előfordulási helyétől kezdve --- a következő helyen: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() a következő helyen: System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) a következő helyen: VstsNuGetPush.NuGetServiceIndexHttpClient.<GetServiceIndexAsync>d__2.MoveNext() --- Verem vége nyomkövetés a kivétel előző előfordulási helyétől kezdve --- a következő helyen: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() a következő helyen: System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) a következő helyen: VstsNuGetPush.HttpServiceIndexProvider.<Get>b__4_0(VssClientCredentials credentials) a következő helyen: VstsNuGetPush.CredentialSelector.TrySelectCredential[TResult](Func2 func, IVssCredentialStorage vssClientCredentialStorage, CredentialPromptType promptType, TResult& result)    a következő helyen: VstsNuGetPush.CredentialSelector.Select[TResult](Func2 func) a következő helyen: VstsNuGetPush.Patterns.Helpers.FactoryAdaptorChain2.Get()    a következő helyen: System.Lazy1.CreateValue() a következő helyen: System.Lazy`1.LazyInitValue() a következő helyen: VstsNuGetPush.VstsNuGetPushCommand.MainCore(ILogger logger) a következő helyen: VstsNuGetPush.VstsNuGetPushCommand.Main()) ##[error]Packages failed to publish Finishing: NuGetCommand

Where can I find the user permissions settings?
How do I grant the necessary permissions (e.g., ‘ReadPackages’) to this user to resolve the issue?

0

Error: Microsoft.VisualStudio.Services.Common.VssServiceException: User ‘6e5a7421-080a-4b76-a45e-37d24e6b9ab8’ lacks permission to complete this action. You need to have ‘ReadPackages’.

Based on the error message, the user doesn’t have the permission to access the feed.

In Azure DevOps Build Pipeline, it will use the Build Service Account to Push the nuget package to Azure Feed.

The Build Service account has two levels: Organization level and Project level.

Project Level: Your-project-name Build Service (your-collection-name)

Organization level: Project Collection Build Service (your-collection-name)

You need to grant the Contributor Role to related Build Service account.

For example: navigate to Feed -> Settings -> Permissions

If you are access the Organization feed or the feed from another project, you need to navigate to Project Settings -> Settings and disable the option: Limit job authorization scope to current project for non-release pipelines.

For example:

For Classic Pipeline, you need to navigate to Option tab and check the Build job authorization scope. If you need to access Organization Feed or Feed from another project, you need to set the scope to Project Collection.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật