denied: requested access to the resource is denied : docker

You may need to switch your docker repo to private before docker push.

Thanks to the answer provided by Dean Wu and this comment by ses, before pushing, remember to log out, then log in from the command line to your docker hub account

# you may need log out first `docker logout` ref. https://stackoverflow.com/a/53835882/248616
docker login

According to the docs:

You need to include the namespace for Docker Hub to associate it with your account.
The namespace is the same as your Docker Hub account name.
You need to rename the image to YOUR_DOCKERHUB_NAME/docker-whale.

So, this means you have to tag your image before pushing:

docker tag firstimage YOUR_DOCKERHUB_NAME/firstimage

and then you should be able to push it.

docker push YOUR_DOCKERHUB_NAME/firstimage

Leave a Comment