I saved the json key file to a local file jsonkey
, then login to GCR using it. Following this guide, I should be able to login using either json key or base64 encoded json key.
However _json_key_base64
doesn't work, only _json_key
works.
Here's my command:
$ cat jsonkey | base64 | docker login -u _json_key_base64 --password-stdin \
https://asia.gcr.io
Error response from daemon: Get "https://asia.gcr.io/v2/": unauthorized: Not Authorized.
$ cat jsonkey | docker login -u _json_key --password-stdin \
https://asia.gcr.io
Login Succeeded
Anyone knows why?
A bug was raised to GCP team, this feature is not supported in Container Registry.
They also edited the related documentation, _json_key_base64
is not listed as supported anymore, only _json_key
.