Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nexus access rights for particular repository

Tags:

maven

nexus

In Sonatype Nexus, I would like to create a user who'd have different access rights to particular repositories, like so:

  • Repository "Releases": create, view, read (so a released version can never be updated or deleted)
  • Repository "Snapshots": create, update, view, read

I tried searching in the section "Repository targets", but all I can do there is giving access to filtered artifacts across all repositories. Predefined groups of repositories are also only based on repo type (M1/M2/Site).

How can I differentiate access based on repository only, regardless of artifacts?

like image 225
MaDa Avatar asked Oct 13 '25 03:10

MaDa


1 Answers

You need to login as admin and navigate to "Security". In there you will see "Privileges" and "Roles". You need to define privileges for the respective repository. By default each repository comes with a privilege called "View". You need to manually create a new privilege Create, Read, Update, Delete (which are created all together as a bunch). Once you have this set up, you need to create a Role and associate those privileges with this role. After that you have to edit the user and assign them the newly created role(s).

If you'd like to go even further and limit developers' access to repositories based on groupId-s, you can check this excellent article for tips.

like image 99
carlspring Avatar answered Oct 15 '25 21:10

carlspring



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!