0

The default service account that a GCP VM use has been granted storage.buckets.* and storage.objects.* roles yet I get the error that storage.buckets.create permission isn't setup.

denied: Token exchange failed for project 'test-307504'. Caller does not have permission 'storage.buckets.create'. To configure permissions, follow instructions at: https://cloud.google.com/container-registry/docs/access-control

The default service account is [email protected] and I've created roles related to storage and assigned to the IAM service account and I ran the command gcloud auth configure-docker. But still I'm unable to push docker images to the GCR repository.

Is there something else I should be doing after assigning the roles to refresh on the VM?

1 Answer 1

2

Apart from permissions, check for the access scope at the VM level.
While you are at, read up on Using the Compute Engine Default Service Account and Best Practices too.

3
  • Damn that was it. I spent hours troubleshooting it but forgot to check this. New to GCP :-)
    – user630702
    Mar 14, 2021 at 16:47
  • nobody has mentioned this anywhere. I looked at a lot of answers on stackoverflow.
    – user630702
    Mar 14, 2021 at 16:48
  • 1
    Actually it is mentioned on the page from the error you get when trying to push the image. 😄
    – jabbson
    Mar 14, 2021 at 16:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .