First of all, I must tell this is an operation I have done many times, with no issues.
I have a docker image registry.gitlab.com/company/metadata_api
with dev
tag.
➜ metadata_api git:(no_basic_auth) ✗ docker images | grep registry.gitlab.com/company/metadata_api
registry.gitlab.com/company/metadata_api dev 80cdbdb33ec9 7 minutes ago 12.2MB
registry.gitlab.com/company/metadata_api latest d9918d874a55 3 weeks ago 12.3MB
I have a deploy token for the project with both scopes read_repository, read_registry
I also have a global personal access token that I will use to discard rigths issues
➜ metadata_api git:(no_basic_auth) ✗ docker login registry.gitlab.com -u oauth2
Password:
Login Succeeded
When I try to push, I get :
requested access to the resource is denied
Why ?
➜ metadata_api git:(no_basic_auth) ✗ docker push registry.gitlab.com/company/metadata_api:dev
The push refers to repository [registry.gitlab.com/company/metadata_api]
a9ae54b0eb8c: Preparing
denied: requested access to the resource is denied