Docker hello-world: authentication error

只愿长相守 提交于 2019-11-28 16:57:28

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.

If you login through your emailId it does not works.

On windows login using your docker hub id.

You can access by your username.

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.

I have solved this issue in macOS Mojave (version : 10.14.3)

docker login

Login with your username not email id then its working fine.

run docker login to execute any other docker commands. or just logout if you want to use public hubs docker logout

On macOS you need to login from the commandline using

docker login

Also you must use your username and not your email

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

For those who logged in via their email address associated with their account during the Docker desktop installation process - this problem seems to occur because the terminal has also stored those credentials, but for some reason it only accepts login's via your actual username.

If you go to DockerHub you should see it in the upper right corner.

Try running docker login with that username, and you should be all set!

docker login

# username from dockerhub
# the same password

Setting my vNAT for docker dns server to 8.8.8.8 resolved my issue on windows just try might help thanks

on ubuntu:

docker login

so if you don't know your username password, you probably haven't created one. what you should do, is go and create an id on docker visit: official docker webpage

just like any other github accout ,they will ask you for the username, provide one and they will authenticate same as github, once done , put your email and password. verify it and you are now good to go.

ok! now coming to the point... if you were facing the problem like the problem statement , just do

docker login 

enter username and password, that you just provided . you will be displayed ,"LOGIN succeeded"

now run this command

docker run hello-world

beware of the dash '-' sign , i myself stuck with this issue, and you are done.

thanks:)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!