Registry denied: requested access to the resource is denied

HI

I am trying to follow following tutorial

https://docs.gitlab.com/ee/ci/examples/laravel_with_gitlab_and_envoy/index.html

I tired
docker login registry.gitlab.com
docker build -t laravel-sample .
docker push laravel-sample

The push refers to repository [docker.io/library/laravel-sample]

7bc7eb5b8a51: Preparing

86fe26dddbc4: Preparing

137eb4ffa196: Preparing

06f018e78af2: Preparing

636339e87abe: Preparing

f66887eae288: Waiting

d185116cabd4: Waiting

35147c9c30e9: Waiting

d40630d93d69: Waiting

919061212917: Waiting

d03212c1c3b4: Waiting

a816c28953b8: Waiting

253661a0181f: Waiting

6744ca1b1190: Waiting

denied: requested access to the resource is denied

I am not sure about this error. I checked and confirm that I have personal token created with API access.

Please help

Hello do you have managed to resolve this issue because I have the same error now?
thank you

I’ve had this issue and there are a few things worth checking:

  • If your logging in with a bot user or token you want to make sure that it has the correct access level.
  • Make sure your tag and push registry is correct. you can verity the registry is correct by going to your repo → container registry page and viewing the cli commands generated by gitlab for your repo container registry, that tag and push needs to match your repo location. I would copy the cli commands from your repo to be safe it should resemble more of gitlab.com/your-group/larvel-sample (just rough example) , you can get the exact commands in container registry page for your repo, that’s what worked for me.