I am following this link to create my first docker Image and it went successfully and now I am trying to push this Image into my docker repository from this link. But whenever I am trying to push this Image into repository , I got this type of error.
denied: requested access to the resource is denied
Could anyone give me some hint towards this problem ? Any help would appreciated.
Note: I have successfully login into docker
Not sure what happened to docker hub, but none of the solutions posted worked for me. Here is the work-around that ended up working for me as of Jan-2018:
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE verse_gapminder_gsl latest 023ab91c6291 3 minutes ago 1.975 GB verse_gapminder latest bb38976d03cf 13 minutes ago 1.955 GB rocker/verse latest 0168d115f220 3 days ago 1.954 GB
docker tag bb38976d03cf dockhubusername/verse_gapminder:mytag
docker login docker.io
docker push dockhubusername/verse_gapminder:mytag
Another (pretty smart) reason for this: you're out of private repos with your plan.
My answer is related to Azure DevOps similar issues I had with the following common pipeline (it is more specific but it might help somebody save time):
The error I received at push
denied: requested access to the resource is denied
sent me here.Please be careful of the variable
$(Build.Repository.Name)
included in your image name. It is by default the name of the repository from github, but for your push to work it should bedockerhub_account_username/your_dockerhub_repository_name
.Replace
$(Build.Repository.Name)
withdockerhub_account_username/your_dockerhub_repository_name
in your image name field for both build and push steps.This is needed by the dockerhub api to know where to push the image.
I got the same issue while taking the docker beginner Course. I solved the issue by doing a
docker login
before the docker push call.If you face this issue while using Azure Container Registry, you can solve it by logging in to your registry first.
And then tag your image to match the host name of your registry.
And then finally push it.
OS: Ubuntu16.04
Reason: I deleted the client config file(~/.docker/config.json)
Solution:
service docker restart.
docker login --username=yourdockerhubername --email=youremail@company.com