The Google Container Registry documentation provides very good help on authenticating to it with Docker. Is there a way to do the same with Podman? The Google doc mentions Access Token as a method. Maybe that could work. If anybody has any advice or experience of this, I'd really appreciate your help
Asked
Active
Viewed 5,125 times
12
-
3gcloud auth print-access-token | podman login -u oauth2accesstoken --password-stdin https://XX.gcr.io. the xx.gcr.io is the host name. for example http://us.gcr.io etc [use this doc](https://cloud.google.com/container-registry/docs/advanced-authentication#linux--macos) – Cam Sep 08 '20 at 18:30
-
1@cam your comment should be an answer! – George Udosen Dec 02 '20 at 15:00
1 Answers
26
gcloud auth print-access-token | podman login -u oauth2accesstoken --password-stdin XX.gcr.io
xx.gcr.io
is the host name. For example https://us.gcr.io
, etc.
oauth2accesstoken
is a special username that tells it to get all identity information from the token passed as a password.

Alexander Trauzzi
- 7,277
- 13
- 68
- 112

Cam
- 588
- 5
- 7
-
`gcloud auth print-access-token --quiet` was necessary because `gcloud` wanted me to take a survey. – ryancerium May 02 '23 at 17:33