当从我的主机推送docker镜像(在成功登录后)时,我得到了“未授权:需要身份验证”。
详情见下文。
-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。见下文。
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做了推送。不走运!
发布于 2020-08-10 19:37:57
我也遇到过类似的问题。
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中,这恰好是seahorse
或Passwords and Keys
工具。我检查了那里,我清理了所有的码头中心登录。在此之后,一个新的docker登录如预期的那样工作。
https://stackoverflow.com/questions/36663742
复制相似问题