[英]Why do I get an authorization error from Docker when I'm trying to pull a public image?
When I tried to run 当我试图跑
$ docker run -it ubuntu /bin.bash
I got the following error: 我收到以下错误:
Unable to find image 'ubuntu:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/ubuntu/manifests/latest: unauthorized: incorrect username or password.
See 'docker run --help'.
Why am I getting an auth error when the ubuntu
image is public? 当
ubuntu
映像公开时,为什么会出现auth错误?
Docker for Windows -- 适用于Windows的Docker -
repro docker pull redis
repro
docker pull redis
I received this error recently. 我最近收到了这个错误。 My solution turned out to be doing a
docker logout
, which seemed to clear the credential entry slot related to docker hub (speculation). 我的解决方案结果是做了一个
docker logout
,这似乎清除了与docker hub相关的凭证输入槽(推测)。 After this, my docker pull redis
worked fine. 在此之后,我的
docker pull redis
工作得很好。
It turns out that Docker checks authentication before it checks what permissions are needed for the image in question. 事实证明,Docker 在检查相关图像所需的权限之前会检查身份验证。
Thus, if you have bad auth details in ~/.docker/config.json
, your request will be flatly rejected. 因此,如果您在
~/.docker/config.json
有严重的身份验证详细信息,您的请求将被断然拒绝。 Fix or remove the bad record and you'll be good to go! 修复或删除不良记录,你会很高兴!
The issue is when you login with your email id as your username. 问题是当您使用电子邮件ID作为用户名登录时。 To resolve this:
要解决此问题:
1) Check what your user id is in the right upper corner: https://hub.docker.com/ 1)检查右上角的用户ID: https : //hub.docker.com/
2) In your terminal: 2)在您的终端:
Check for docker id in Docker Hub in the upper right corner. 检查右上角Docker Hub中的docker id。 You can log in with both email id and docker id.
您可以使用电子邮件ID和泊坞窗ID登录。 This issue comes when you do it with your email id.
使用您的电子邮件ID进行此问题时会出现此问题。
This wored for me: Try to login in command line 这对我来说很有用:尝试登录命令行
$ docker logout
$ docker login
Be aware that logging in on the commandline requires your username, NOT email address
请注意,登录命令行需要您的用户名,而不是电子邮件地址
Source: https://github.com/docker/hub-feedback/issues/1098 资料来源: https : //github.com/docker/hub-feedback/issues/1098
On the window tray, if you've logged in with your email address, please log out and log in with your username, that will do the trick. 在窗口托盘上,如果您已使用您的电子邮件地址登录,请注销并使用您的用户名登录,这样就可以了。 Thanks.
谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.