How to solve requested access to the resource is denied error when pushing docker images to registry?
When you want to push an docker image to harbor or other docker registries, you would get this error:
[[email protected] ~]# docker push 10.1.2.112:8443/envoyproxy/envoy-alpine:latest The push refers to repository [10.1.2.112:8443/envoyproxy/envoy-alpine] 5389ef4288ac: Preparing 2edbab403b11: Preparing d7ae7175ca34: Preparing 384cabecb0e8: Preparing d170a651c616: Preparing 5216338b40a7: Waiting denied: requested access to the resource is denied
You should specify the repository name in the tag of the docker image, e.g.
Instead of this tag:
You should use this tag:
Because there is a repository in the your registry like this:
You should make sure that you have logged in the harbor repo:
docker logout docker login -u admin 10.1.2.112:8443 Login Succeeded