Access control in Google Cloud is controlled using Cloud Identity and Access Management (Cloud IAM). Cloud IAM allows you to set permissions specifying who has what kind of access to which resources in your project.
Cloud Source Repositories uses Cloud IAM for access control. You can use Cloud IAM to add team members to your project and to grant them permissions to create, view, and update repositories.
This page describes the Cloud IAM permissions and roles that apply to Cloud Source Repositories.
With Cloud IAM, every action on a repository in Cloud Source Repositories requires that the account initiating the action has the appropriate permissions. You don't grant specific permissions to an account. Instead, you grant a role that contains the appropriate set of permissions.
The following table describes the permissions available in Cloud Source Repositories.
||List repositories within a project.|
||Create a repository within a project.|
||Clone, fetch, and browse repositories.|
||Push changes to a repository.|
||Change a repository configuration.|
||Delete a repository.|
||Read/view the Cloud IAM policy of a repository.|
||Change the Cloud IAM policy of a repository.|
||Read/view the Cloud project configuration.|
||Change the Cloud project configuration.|
You assign permissions to accounts through the use of roles. The following table lists the roles available for Cloud Source Repositories.
||Source Repository Reader|
||Source Repository Writer|
||Source Repository Administrator|
Roles and permissions matrix
Use the table below to select the appropriate role for an account based on the types of actions you want that account to perform.
|Clone, fetch, and browse repositories|
|Update repository configurations|
|View Cloud IAM policies|
|Set Cloud IAM policies|
|View Cloud project configurations|
|Update Cloud project configurations|
In addition to the predefined roles, Cloud Source Repositories also supports custom roles. For more information, see Creating and managing custom roles in the Cloud IAM documentation.
Granting member access
In Cloud IAM, you grant access to members. There are multiple types of members. For a complete list, see Concepts related to identity.
For specific steps on granting member access, see Granting, changing, and revoking access to resources.
You can't make a Google Cloud repository public. As a result, Cloud Source Repositories doesn't support the following member types: