I have ubuntu 14 and have installed docker 1.8.3. Unfortunately I have this error:
sudo docker login
Username (mauriziobioinfo):
WARNING: login credentials saved in /home/maurizio/.docker/config.json
Login Succeeded
sudo docker push mauriziobioinfo/varscan
The push refers to a repository [docker.io/mauriziobioinfo/varscan] (len: 1)
ec3a068ba18d: Buffering to Disk
unauthorized: access to the requested resource is not authorized
As the error says requested access to the resource is denied error which means you as a docker user do not have the correct rights/permission to run the docker push or any other docker command. Or you are not using the docker hub credentials correctly.
To push an image to Docker Hub, you must first name your local image using your Docker Hub username and the repository name that you created through Docker Hub on the web. You can add multiple images to a repository by adding a specific :<tag> to them (for example docs/base:testing ).
To run the docker login command non-interactively, you can set the --password-stdin flag to provide a password through STDIN . Using STDIN prevents the password from ending up in the shell's history, or log-files.
The solution for me was to run "docker login" before the command. So I logged in and then pushed.
I had a similar error message using a repository on quay.io specifically. I had to mark the image as public even after a docker login quay.io
command. It was an odd error and an odd solution since I had permissions to the image.
Things to troubleshoot:
docker login
must be executed before a docker push username/repository:tag
command.
The docker push
is not that automatic that it would give a different error message when not being logged in (or that it even would prompt for login on itself)
Double check that the repository name in the push argument matches an existing one
That means search for it under:
https://hub.docker.com/u/$username/
/root/.docker/config.json
out of the way in case it is broken. Then, re-execute docker login
./root/.docker/config.json
. For example, with some docker versions (e.g. 1.8.1/1.9.1) you have to replace docker.io
with https://index.docker.io/v1/
sudo
then make sure that all of them are executed with sudo (e.g. check if alias docker
returns a definition)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With