Docker hello-world: authentication error

2019-01-21 16:58发布

问题:

I'm just getting started with docker. I'm following the instructions specified here https://docs.docker.com/windows/step_one/

I installed docker (1.10.2) on windows 10 & ran docker run hello-world . But, I'm getting an authentication error while the tutorial doesn't mentioned anything about it.

Here's the message I received.

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Authentication is required: Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: unauthorized: incorrect username or password.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.

I searched google & here, but couldn't find anything similar to this error message.

Thanks!

回答1:

Please run docker login at first time when you run any other docker commands.

You can log into any public or private repository for which you have credentials. When you log in, the command stores encoded credentials in $HOME/.docker/config.json on Linux or%USERPROFILE%/.docker/config.json on Windows.



回答2:

If you login through your emailId it does not works.

On windows login using your docker hub id.

You can access by your username.



回答3:

Probably it can happen if you were logged in before, by console or by kitematic.

You can try docker logout if you want use docker without auth.

In this case Authentication is required: shouldn't appear again.



回答4:

For worked trying docker logout and then docker login with the proper credentials