Problem
When a user attempts to upload a component to a Nexus Repository 3, the following error is observed:
"Not authorized for requested path"
The nexus.log records an error similar to the following:
org.sonatype.nexus.coreui.UploadResource - Unable to perform upload to repository
repo1
org.sonatype.nexus.rest.ValidationErrorsException: Not authorized for requested
path 'test/myfile'
Resolution
The authorization error indicates that the user has insufficient permissions to upload to the repository.
The following privilege is required for a user to upload to a repository:
nx-repository-view-<format>-<repo>-add
Some build tools, such as Maven and yum, require more than upload. As part of the deployment process they also need to edit metadata files, which require additional permissions. For those repositories the following permissions are needed:
nx-repository-view-<format>-<repo>-add
nx-repository-view-<format>-<repo>-read
nx-repository-view-<format>-<repo>-edit
If uploading via the UI, the nx-component-upload permission is also required.