首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >docker未授权:需要身份验证-成功登录后推送

docker未授权:需要身份验证-成功登录后推送
EN

Stack Overflow用户
提问于 2016-04-16 19:45:55
回答 28查看 228.6K关注 0票数 126

当从我的主机推送docker镜像(在成功登录后)时,我得到了“未授权:需要身份验证”。

详情见下文。

代码语言:javascript
运行
复制
-bash-4.2# docker login --username=asamba --email=anand.sambamoorthy@gmail.com
WARNING: login credentials saved in /root/.docker/config.json
*Login Succeeded*
-bash-4.2#
-bash-4.2# docker push asamba/docker-whale

Do you really want to push to public registry? [y/n]: y
The push refers to a repository [docker.io/asamba/docker-whale] (len: 0)
faa2fa357a0e: Preparing
unauthorized: authentication required

存储库docker版本: 1.9.1 (客户端和server)

/var/log/messages显示403,我不知道这个docker。见下文。

代码语言:javascript
运行
复制
Apr 16 11:39:03 localhost journal: time="2016-04-16T11:39:03.884872524Z" level=info msg="{Action=push, Username=asamba, LoginUID=1001, PID=2125}"
Apr 16 11:39:03 localhost journal: time="2016-04-16T11:39:03.884988574Z" level=error msg="Handler for POST /v1.21/images/asamba/docker-whale/push returned error: Error: Status 403 trying to push repository asamba/docker-whale to official registry: needs to be forced"
Apr 16 11:39:03 localhost journal: time="2016-04-16T11:39:03.885013241Z" level=error msg="HTTP Error" err="Error: Status 403 trying to push repository asamba/docker-whale to official registry: needs to be forced" statusCode=403
Apr 16 11:39:05 localhost journal: time="2016-04-16T11:39:05.420188969Z" level=info msg="{Action=push, Username=asamba, LoginUID=1001, PID=2125}"
Apr 16 11:39:06 localhost kernel: XFS (dm-4): Mounting V4 Filesystem
Apr 16 11:39:06 localhost kernel: XFS (dm-4): Ending clean mount
Apr 16 11:39:07 localhost kernel: XFS (dm-4): Unmounting Filesystem

任何帮助,请让我知道,如果您需要进一步的信息。我也用-f做了推送。不走运!

EN

Stack Overflow用户

发布于 2020-08-10 19:37:57

我也遇到过类似的问题。

代码语言:javascript
运行
复制
Error response from daemon: Get https://registry-1.docker.io/v2/hadolint/hadolint/manifests/latest: unauthorized: incorrect username or password

我发现,即使我使用docker login命令成功登录,任何拉取都会失败。我试着清理~/.docker/config.json,但没有任何改进。

查看配置文件,我发现凭证不是保存在那里,而是保存在"credsStore": "secretservice"中。在Linux中,这恰好是seahorsePasswords and Keys工具。我检查了那里,我清理了所有的码头中心登录。在此之后,一个新的docker登录如预期的那样工作。

票数 1
EN
查看全部 28 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36663742

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档