以下详细信息
我登录docker成功;
@ubuntu:~$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username (******):
Password:
Login Succeeded
但是当推送图像时:
@ubuntu:~$ docker push nodejsubuntu
The push refers to a repository [docker.io/library/nodejsubuntu]
9ce2f4fd17ae: Preparing
0cad5e07ba33: Preparing
48373480614b: Preparing
055757a19384: Preparing
c6f2b330b60c: Preparing
c8a75145fcc4: Waiting
unauthorized: authentication required
docker version:
Docker version 1.12.1, build 23cf638`
和我的〜/ .docker / config.json在下面:
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "*****"
}
}
}
使用命令:
sudo cat /var/log/syslog | grep docker
我收到了消息:
time="2016-09-14T09:37:36.511442483Z" level=error msg="Attempting next endpoint for push after error: unauthorized: authentication required"
答案 0 :(得分:2)
您需要推送到您的命名空间。您正在尝试推送到您无权执行的根命名空间:
docker push <your-username>/nodejsubuntu
例如:
docker push sethvargo/nodejsubuntu