Problem: Users can't browse contents of closed staging repositories (Nexus Repository 2)

Visit for documentation on Nexus Repository version 2.

repository read permissions only allow you to access artifacts which match the staging profile's target regular expression. 

If your users have restricted read permissions (no "all repository" reads allowed) this can cause a problem where they cannot browse the content of closed staging repositories.   

For example, suppose you have this regular expression defined in a staging profile target:


This doesn't allow direct access to the directories above /com/somecompany/someproject because they don't match the regular expression. Consequentially, browsing the contents of staging repositories in this profile won't work.

To fix this, you need to change the regular expression in the target to include all of the directories along the path:


This will allow reading of directory listings for /, /com/, and /com/thalesgroup/. It will not allow download of any artifacts in these directories, it only allows reading the directories themselves.

Alternatively, you could create a new repository target privilege for all repositories with this regular expression and assign it to your users:


This will grant access to all directory listings in the instance, but will not allow access to any files within those directories unless the user has permission to read them. Using this technique allows you to avoid making complex regular expressions for every path you're restricting.

Have more questions? Submit a request


Article is closed for comments.