3

I would like only 1 person to have write access to master branch.

All other people would only be able to clone and make pull requests for master.

Is this possible to control with Google Cloud IAM?

ForeverConfused
  • 1,607
  • 3
  • 26
  • 41

1 Answers1

4

This doesn't appear to be currently possible, all the GCP repositories-related IAM roles/permissions have a repo-wide scope, there are no mentions to branches in Controlling access to repositories or List of all permissions and support levels.

The only workaround that comes to mind is to connect your GCP repository to a hosted repository where you'd be controlling access (see Connecting a Hosted Repository), effectively making the GCP repository just a slave/mirror. Both GitHub and BitBucket support per-branch access control. But that would be based on their own access control roles/permissions, not the GCP IAM ones, donno if that'd be acceptable for your case.

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97