GCP Artifact Registry に push したら以下のエラーが発生した。 権限の設定ミスっぽいエラーだけど、それっぽい権限を付けてもエラーは解消されなかった。
denied: Permission "artifactregistry.repositories.downloadArtifacts" denied on resource "xxx" (or it may not exist)
エラーの原因は Artifact Registry へのリクエストを認証するためのコマンドである "gcloud auth configure-docker" が間違っていることだった。 Container Registry では以下のように認証するが・・・
gcloud auth configure-docker
https://cloud.google.com/container-registry/docs/advanced-authentication?hl=ja#gcloud-helper
Artifact Registry では以下のように認証する。 具体的には認証対象のホストを指定する必要がある。
gcloud auth configure-docker us-central1-docker.pkg.dev
https://cloud.google.com/artifact-registry/docs/docker/quickstart?hl=ja#auth
ドキュメントちゃんと読めって話でした・・・。