While working on a project I recently was working on pushing up a Docker image to the Docker registry and received the following
The push refers to repository [docker.io/user/project]
denied: requested access to the resource is denied
This did not seem right as I had just previously logged in successfully to the Docker Registry with my username and password. Turns out that I had not logged in to docker.io only the registry itself so I was not allowed to do what I wanted to do with my Docker push command.
I then proceeded to login in with the following command
docker login –u “username” –p “password” docker.io
This will log you in to the correct location in Docker Hub to push your container.
Hope this helps.