Denied: requested access to the resource is denied

I’m starting with docker and using Docker Community Edition - Version 18.03.0-ce-mac60 (23751).
I’m practicing an exercise about build and push to Docker Hub and I found a unexpected problem. After logging (successfully) and running command (docker push pauloperesbr) I receive the message: “denied: requested access to the resource is denied”.
What is happening? Why I’m receiving this message after login with success?
I checked other groups and I don’t had success.
Somebody could help me?

MacBook-Pro-de-PAULO:volume-exemplo PPERES$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don’t have a Docker ID, head over to https://hub.docker.com to create one.
Username (pauloperesbr): pauloperesbr
Password:
Login Succeeded
MacBook-Pro-de-PAULO:volume-exemplo PPERES$ docker push pauloperesbr
The push refers to repository [Docker]
144d6cb8e557: Preparing
c8b92a8f64b4: Preparing
7ff93b2699ab: Preparing
f58cfeda9e5f: Preparing
33aed7748ee3: Preparing
0e0b4ee1c6dc: Waiting
ff57bdb79ac8: Waiting
6e5e20cbf4a7: Waiting
86985c679800: Waiting
8fad67424c4e: Waiting
denied: requested access to the resource is denied

Hi, Paulo.

Pushes are usually of the form

docker push repo/image[:tag]

So, if your repo is A, and your image name is B, that would be

docker push A/B

which would also receive the tag “latest”.

I suspect your Hub login is pauloperesbr, which would often be the repo name, too. So, your pushes of an image named web_service to the repo pauloperesbr might look like

docker push pauloperesbr/web_service:1.20

You can find out more here: https://docs.docker.com/docker-hub/repos/
and here: https://docs.docker.com/docker-cloud/builds/push-images/

Best of luck!

I have this problem.And resolve it now.
First, login your docker account.
Second, use this command:docker images,
this command can show you all images you have, then you chose an image to push.
Third, you should add a tag for image you chose. You can use this command:
docker tag existent_image_name:latest your_user_name/new_image_name:latest
Finally, you use this command:docker push your_user_name/new_image:latest
please try it again, if denied again.You can use sudo command like this:
sudo docker push your_user_name/new_image:latest
good luck!

5 Likes

Thanks you very much, this work for me!

works for me also, Thanks for the information

The fix for me was to change the repo name to reflect the same name of the actual image I am trying to push. After that a simple logout, log back in fixed it.