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?