Docker push - Error - requested access to the resource is denied

Hi all, my organization is having this problem as well. Everything was working fine until today: Now, for any new repositories/tags we create, once they are pushed for the first time, we cannot pull them, nor push an update.

All of our images from before today can still be pulled without any issue. No status issues reported at Dockerhub however.

It also appears that the images that I create that I can’t update I also cannot delete through the hub.docker.com web gui. It allows me to put through the request for deletion without any issues but hours later the images are still there.

This seems to be an intermittent issue that was fixed now. Although the images I created during the error period do not seem possible to delete from the GUI. Will update if these zombie images become deleteable in the next few days.

@saubin Thanks for the heads up, it appears I can also push now, hopefully it’s fixed for good. I’ll check back after the weekend myself and see if I can delete the zombies that I created seeing if I could recreate the issue and update if I can.

Seems that I can delete the zombies now, hopefully you have luck with it too :smiley:

Agreed, this works! Also helps with Push from Docker Desktop UI.

it really helps thx!

Thank you very much I was really stuck. Also it is advisable that you use --p-stdin for security purposes -)

Hello from 2023…

I found out that to push your docker image, you need to first login into your docker hub account and your image you me be in this format ‘repositoryName/imageTag’. so that docker will know that you are try to push to your repository. If your repository name does not come in, it will try to push to docker . io/library/imageName instead of docker.io/repositoryName/imageName

This means that if you have an image name that does not carry your repository name, you need to retag tour image

Take a look at this article here
https://www.educba.com/docker-push/

1 Like

get the same error.
the reason is that my docker image name is not following the rule: mydockerusername/imagename.
wrong:
docker build -t xxxx .
correct:
docker build -t mydockerusername/xxxx

it worked for me as well, thanks

thx bro. this works for me!

How can I not seeing this earlier!

1 Like

Do it in following way:
Step-1: Login to docker using
$ docker login

Step-2: Retag the image:

$ docker tag <Image1:tag1>  <docker_username>/<docker_repo_name:tag>

Example: 
$ docker tag hello-world-java:0.0.1-SNAPSHOT  arundhwaj/hello-world-docker:v5

Step-3: Push the retagged image to docker repo
$ docker push arundhwaj/hello-world-docker:v5

Step-4: Hope it helped you !!!

1 Like

tôi phải thực hiện lệnh nào để hoàn thành?

Thank you so much. I was challenged on gitlab ci with this. I was trying to login to my entire repository on docker hub, using docker.io/*****, youre suggestion worked for me. :smiley:

Thanks to you I finally solved my issue!

The correct command to push the image is:
docker push your-dockerhub-username/projetofinal2_web:tagname

you can just do
docker tag image-name username/image-name

Thanks. This worked for me as well.