If you push an image, it will deny access.
#docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
dockercon / test latest 896 f1 a3a36b244 hoursago 529 MB
centos latest 470671670 cac3 monthsago 237 MB
# image push
docker push dockercon/test —latest
The push references to repository [docker.io/dockercon/test]
c555f2a4fa06:Preparing
2bfd1607c09c:Preparing
cb764bb74596:Preparing
2d03d772d036: Preparing
b279b0382422: Preparing
55b116366b5f: Waiting
5bad68351841: Waiting
21335377d997 - Waiting
1a7b04ce32bf: Waiting
88a4c5f6ce87: Waiting
8af55873 dfab: Waiting
0683de282177 - Waiting
denied —Requested access to the resource is denied
[root@DESKTOP-DF03I65~]#docker version
Client:
Version 1.13.1
API version: 1.26
Package version:
Go version: go1.10.3
Git commit: 64e9980/1.13.1
Built: Tue Apr 28 14:43:01 2020
OS/Arch: linux/amd64
Server:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Package version:
Go version: go1.12.17
Git commit — afacb8b
Built: Wed Mar 1101:29:16 2020
OS/Arch: linux/amd64
experimental:false
I think the reason is that namespace is the username. Is dockercon
your username?As long as you go to https://hub.docker.com/u/dockercon, it feels like it belongs to someone else.
The way to check docker hub namespace is the username when docker login
.
$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: [username] # This will be your name space
Password:
Login Succeeded
For example, if you push https://hub.docker.com/_/hello-world into your namespace:
$docker pull hello-world
$ docker tag hello-world [ username ] / hello-world
$ docker push [ username ] / hello-world
Therefore, please check the user name.Also check the docker push document.
© 2024 OneMinuteCode. All rights reserved.