2016-09-14 58 views
0

以下详细信息未授权:推送我的图像时需要身份验证

我登录docker succeeded;

@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 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" 

回答

2

您需要推到您的命名空间。您正在试图推到根命名空间,您没有权限做:

docker push <your-username>/nodejsubuntu 

例如:

docker push sethvargo/nodejsubuntu 
+0

非常感谢much.The的原因是,我创建了错误的图像名称,不与/nodejsubuntu,只有nodejsubuntu。 – joey

+0

我从过去24小时一直拉我的头发,这解决了问题。 – Nagri