I try to push the docker image to eu.gcr.io and I get 403 Forbidden
gcloud docker push eu.gcr.io/<projectname>/<image>:latest The push refers to a repository [eu.gcr.io/<projectname>/<image>] (len: 1) 663cd9de01fe: Preparing Post https://eu.gcr.io/v2/w<projectname>/<image>/blobs/uploads/: token auth attempt for registry: https://eu.gcr.io/v2/token?account=_token&scope=repository%3A<projectname>%2F<image>3Apush%2Cpull&service=eu.gcr.io request failed with status: 403 Forbidden
I checked
I ran into the same problem in order to solve it so that I do it.
docker login -e 1234@5678.com -u _token -p "$(gcloud auth print-access-token)" https://gcr.io
(When using sudo docker token will be saved with the root account.)
sudo docker
Then use docker push gcr.io/projetc_id/imagename according to How to transfer the docker image to a private repository
docker push gcr.io/projetc_id/imagename
It seems that the problem is that the (local) docker tag was incorrect, the tag was the "project name" instead of the "gcloud project id", therefore, changing the tag to the containing project, click.
Source: https://habr.com/ru/post/1240935/More articles:Make web API authentication 401 instead of redirecting to login page - authenticationAndroid Studio quits unexpectedly on Mac - android-studioRxJava - how to call a subscriber on 4 click events in Android - androidNew throws bad_alloc even though the header is not defined? - c ++List selection does not increase or decrease in the list when you click the arrow button - wpfCrowded shortcuts cannot be read in piechart and barcharts - ioscfSpreadsheet 2-digit years - coldfusionHow to write distributions using JFR on the command line? - profilingEvent-sourcing: processing received data - event-sourcingsetting up the server on bluehost for the laravel application and the problem with php -v - phpAll Articles