Search code examples
artifactory

Artifactory REST API gives a forbidden 403 error when querying own repository


I have a docker repository in Artifactory which I want to replicate:

  • Created a new user for it, put it in a group and gave that group permission to read, annotate, deploy/cache and delete/overwrite on the repository.
  • Logged in to the Artifactory UI using the new user's credentials, added the user credentials to the repository using Set Me Up and generated an access token.

However, when I configure replication for the repository using the new user's credentials I get a forbidden 403 error. I can access the repository via the UI, but when I try to use the REST API I also get a forbidden 403 error, so I figured that this was the root of my problem. Using the admin account works (curl -X GET -u admin:pass artifactory-url/artifactory/api/repositories/my-repo).


Solution

  • The REST API method for setting repository replication configuration requires a user with admin permissions. You can see the required permission in the API documentation.