gcloud docker push 403 Forbidden

孤街醉人 提交于 2019-12-01 17:40:13
Ali SAID OMAR

I had faced the same issue, to resolve it in order I done.

  1. Rename the images as told
  2. Add the user to docker group (important for the docker login)
  3. Use docker login token https://cloud.google.com/container-registry/docs/auth
docker login -e 1234@5678.com -u _token -p "$(gcloud auth print-access-token)" https://gcr.io 

(If using sudo docker, the token will be stored with the root account.)

Then use docker push gcr.io/projetc_id/imagename according to How to push a docker image to a private repository

Looks like the problem is that the (local) docker tag was incorrect, the tag was the "project name" instead of "gcloud project id" so by changing the tag to contain the project the push works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!