我有ubuntu 14并安装了docker 1.8.3。不幸的是我有这个错误:
sudo docker login
Username (mauriziobioinfo):
WARNING: login credentials saved in /home/maurizio/.docker/config.json
Login Succeeded
sudo docker push mauriziobioinfo/varscan
The push refers to a repository [docker.io/mauriziobioinfo/varscan] (len: 1)
ec3a068ba18d: Buffering to Disk
unauthorized: access to the requested resource is not authorized
我的解决方案是在命令之前运行“docker login”。
所以我登录然后推了。
确保您以前在Docker Hub的Web界面上创建了此存储库。
确保您尝试推送的图像的名称与您创建的存储库的名称相同。
我在quay.io上使用了一个类似的错误消息。我不得不将图像标记为公共图像,即使是在图像之后 docker login quay.io
命令。这是一个奇怪的错误和奇怪的解决方案,因为我有权使用图像。
需要从终端登录Docker。下面是我在登录前后显示的终端输出。
ubuntu@ip-172-31-45-50:~/dockertest$ docker push anuvrattiku/anuvrattiku-repository
The push refers to a repository [docker.io/anuvrattiku/anuvrattiku-repository]
3cd43b7ac945: Preparing
5f70bf18a086: Preparing
6f32b23ac95d: Preparing
14d918629d81: Preparing
fd0e26195ab2: Preparing
unauthorized: access to the requested resource is not authorized
ubuntu@ip-172-31-45-50:~/dockertest$ docker push anuvrattiku/anuvrattiku-repository:1.0The push refers to a repository [docker.io/anuvrattiku/anuvrattiku-repository]
3cd43b7ac945: Preparing
5f70bf18a086: Preparing
6f32b23ac95d: Preparing
14d918629d81: Preparing
fd0e26195ab2: Preparing
unauthorized: access to the requested resource is not authorized
ubuntu@ip-172-31-45-50:~/dockertest$ docker login
Username: my_user_id
Password:
Email: my_email_id
WARNING: login credentials saved in /home/ubuntu/.docker/config.json
Login Succeeded
ubuntu@ip-172-31-45-50:~/dockertest$ docker push anuvrattiku/anuvrattiku-repository:1.0The push refers to a repository [docker.io/anuvrattiku/anuvrattiku-repository]
3cd43b7ac945: Pushed
5f70bf18a086: Pushed
6f32b23ac95d: Pushed
14d918629d81: Pushed
fd0e26195ab2: Pushed
1.0: digest: sha256:2436bcf56c15f50f51516204808bb4f5ab5f9d46c5e995435dcab528b06c3683 size: 5288
ubuntu@ip-172-31-45-50:~/dockertest$