Is the CI_JOB_TOKEN really not authorized to access the registry API?

Viewed 1104

The Gitlab Documentation clearly says that CI_JOB_TOKEN is valid authorization for the container registry API. But why, then, does the following when run in an otherwise empty test pipeline yield a 403 forbidden?

curl --header  "JOB-TOKEN: $CI_JOB_TOKEN" $CI_API_V4_URL/projects/$CI_PROJECT_ID/registry/repositories/

Even if the JOB_TOKEN inherits permission from the author of the pipeline it should work, since the author (me) can access above API with my personal API token.

What am I missing? And what could I do to debug it?

1 Answers

As of now, the Job Token really does not support these API calls. I just tripped over this as well.

Some people even use elaborate kludges to mitigate this.

Related