Home > front end >  GCP - Not able to Push docker image from Compute Engine to Container Registry
GCP - Not able to Push docker image from Compute Engine to Container Registry

Time:02-01

I'm not able to push docker images from Compute Engine VM to Container registry. I have added the credentials to the service account but I still get:

unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication

CodePudding user response:

Your service account should have roles/storage.legacyBucketWriter role on GCR's bucket (artifacts.PROJECT-ID.appspot.com for gcr.io). More documentation is here.

  • Related