简体   繁体   中英

Docker denied: requested access to the resource is denied

I guess this question might have been asked many times, but somehow none of the answers that I can see from the other Stackoverflow posts, I could still not get this solved. So here is what is happening:

  1. I create an image locally using docker build

docker build -f Dockerfile -t joesan/my-image .

  1. I then log in to the docker hub

docker login -u myuser -p mypass

I get a Login succeed message

  1. I then push the image as:

docker push joesan/my-image

But as soon as I do step 3, I get the error below:

The push refers to repository [docker.io/joesan/my-image]
2c69d2eb093b: Preparing
d2f0b6dea592: Preparing
197c666de9dd: Preparing
cf5b3c6798f7: Preparing
denied: requested access to the resource is denied

I even tried to tag my image before pushing, but it still would not work. Is there a solution to this?

Ok, what worked for me was to set the project repository in Docker hub to public. All these while the repository was marked private in my Docker hub and this was causing the access denied messages. As soon as I changed the repo from private to public, I was able to successfully push!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM