Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: (gcloud.run.services.update) PERMISSION_DENIED: Permission 'run.services.get' denied on resource 'namespaces/*/services/test-repo'

I have following permissions in google cloud.

  1. BigQuery Admin
  2. Cloud Functions Admin
  3. Cloud Scheduler Admin
  4. Compute Admin
  5. Editor
  6. Source Repository Administrator
  7. Storage Admin

I am creating a cloud run container using cloud repository. But getting following error.

ERROR: build step 2 "gcr.io/google.com/cloudsdktool/cloud-sdk:slim" failed: step exited with non-zero status: 1 ERROR Finished Step #2 - "Deploy" Step #2 - "Deploy": ERROR: (gcloud.run.services.update) PERMISSION_DENIED: Permission 'run.services.get' denied on resource 'namespaces/buypower-mobile-app/services/test-repo' (or resource may not exist).

like image 384
Danish Bansal Avatar asked Sep 14 '25 07:09

Danish Bansal


1 Answers

If you're using Cloud Build to deploy the Cloud Run service, then the error you’re getting is because the Service Account used by Cloud Build does not have sufficient permissions to update the Cloud Run service, according to the official documentation.

The specific error is that permission is denied on run.services.get. This method is part of either roles/run.admin or roles/run.developer. Both roles include the permission run.services.update, which it'll need.

To get it working, you will need to add that one of those roles to the Service Account that is being used by Cloud Build.

like image 60
DazWilkin Avatar answered Sep 16 '25 08:09

DazWilkin