从主机推送 docker 映像(成功登录后)时,我收到“未经授权:需要身份验证”。
详细信息如下。
-bash-4.2# docker login --username=asamba [email protected]
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(客户端和服务器)
-
http://hub.docker.com也创建了存储库(asamba/docker-whale)。
/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 进行了推送。没有运气!
您需要登录 Docker。
第1步:登录docker hub
根据 @KaraPirinc 的评论,在 Docker 版本 17 中为了登录:
docker login -u username --password-stdin
然后在询问时输入您的密码。
步骤2:在中创建存储库码头枢纽.
咱们说“sql服务器:sql".
docker push <user username>/mysqlserver:sql
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)