2024년 6월 17일부터 신규 고객은 Cloud Source Repositories를 사용할 수 없습니다. 이전에 조직에서 Cloud Source Repositories를 사용한 적이 없는 경우 API를 사용 설정할 수 없거나 Cloud Source Repositories를 사용할 수 없습니다. 조직에 연결되지 않은 새 프로젝트는 Cloud Source Repositories API를 사용 설정할 수 없습니다. 2024년 6월 17일 이전에 Cloud Source Repositories를 사용한 조직은 이 변경사항의 영향을 받지 않습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-21(UTC)"],[],[],null,["# Granting user access to repositories and projects\n\nThis topic describes how you can provide users access to repositories and\nprojects, and what actions those users can take. Examples of user actions\ninclude the following:\n\n- Listing repositories\n- Creating new repositories\n- Updating repositories\n\nFor a complete list of actions, see\n[Roles and permissions matrix](/source-repositories/docs/configure-access-control#roles_and_permissions_matrix).\n\nGrant permissions to view repositories\n--------------------------------------\n\nUsers with this level of permissions can view the contents of a repository. They\ncan also clone and fetch the repository.\n\nIf granted this permission at the project level, users can view all repositories\nfor that project.\n\n### Grant viewing permissions for a repository\n\n### Console\n\n1. In the Google Cloud console, open Cloud Source Repositories in the [My source](https://source.cloud.google.com/) view tab\n\n2. Click the name of a repository.\n\n The **Files** view opens.\n3. Click\n **Settings** *settings*.\n\n The **General settings** page opens.\n4. Click **Permissions**.\n\n The **Permissions** page opens.\n5. In the **Members** field, enter the user's email address.\n\n6. In the **Role** drop-down list, select\n **Source repository \\\u003e Source Repository Reader**.\n\n7. Click **Add**.\n\n### Command line\n\n1. Open a terminal window.\n\n2. Enter the following command:\n\n gcloud source repos set-iam-policy [REPO_NAME] [POLICY_FILE] [GCLOUD_WIDE_FLAG ...]\n\n Where:\n - `[REPO_NAME]` is the name of the repository.\n - `[POLICY_FILE]` is the JSON or YAML file with the Identity and Access Management policy.\n\nFor more information on this command, see\n[gcloud source repos set-iam-policy](/sdk/gcloud/reference/source/repos/set-iam-policy).\n\n### Grant viewing permissions across a project\n\n### Console\n\n1. In the Google Cloud console, open Cloud Source Repositories in the [My source](https://source.cloud.google.com/) view tab\n\n2. Click the name of a Google Cloud project ID for a specific repository.\n\n The page displays a list of all repositories for that project.\n3. Click\n **Settings** *settings*.\n\n The **General settings** page opens.\n4. Click **Permissions**.\n\n The **Permissions** page opens.\n5. In the **Members** field, enter the user's email address.\n\n6. In the **Role** drop-down list, select\n **Source repository \\\u003e Source Repository Reader**.\n\n7. Click **Add**.\n\n### Command line\n\n1. Open a terminal window.\n\n2. Enter the following command:\n\n gcloud projects add-iam-policy-binding [PROJECT_ID] --member=[MEMBER] \\\n --role=[ROLE] [GCLOUD_WIDE_FLAG ...]\n\n Where:\n - `[PROJECT_ID]` is the ID for your Google Cloud project.\n - `[MEMBER]` is the user you want to add.\n - `[ROLE]` is the IAM role you want to assign.\n\nFor more information on this command, see\n[gcloud projects add-iam-policy-binding](/sdk/gcloud/reference/projects/add-iam-policy-binding).\n\nGrant permissions to push commits\n---------------------------------\n\nUsers with this level of permissions can push changes to a repository. They can\nalso perform all the actions described in\n[Viewing repositories](#viewing_repositories).\n\nIf granted this permission at the project level, users can push changes\nto all repositories in that project.\n\n### Grant push permissions for a repository\n\n### Console\n\n1. In the Google Cloud console, open Cloud Source Repositories in the [My source](https://source.cloud.google.com/) view tab\n\n2. Click the name of a repository.\n\n The **Files** view opens.\n3. Click\n **Settings** *settings*.\n\n The **General settings** page opens.\n4. Click **Permissions**.\n\n The **Permissions** page opens.\n5. In the **Members** field, enter the user's email address.\n\n6. In the **Role** drop-down list, select\n **Source repository \\\u003e Source Repository Writer**.\n\n7. Click **Add**.\n\n### Command line\n\n1. Open a terminal window.\n\n2. Enter the following command:\n\n gcloud source repos set-iam-policy [REPO_NAME] [POLICY_FILE] [GCLOUD_WIDE_FLAG ...]\n\n Where:\n - `[REPO_NAME]` is the name of the repository.\n - `[POLICY_FILE]` is the JSON or YAML file with the IAM policy.\n\nFor more information on this command, see\n[gcloud source repos set-iam-policy](/sdk/gcloud/reference/source/repos/set-iam-policy).\n\n### Grant push permissions for a project\n\n### Console\n\n1. In the Google Cloud console, open Cloud Source Repositories in the [My source](https://source.cloud.google.com/) view tab\n\n2. Click the name of a Google Cloud project ID for a specific\n repository.\n\n The page displays a list of all repositories for that project.\n3. Click\n **Settings** *settings*.\n\n The **General settings** page opens.\n4. Click **Permissions**.\n\n The **Permissions** page opens.\n5. In the **Members** field, enter the user's email address .\n\n6. In the **Role** drop-down list, select\n **Source Repository \\\u003e Source Repository Writer**.\n\n7. Click **Add**.\n\n### Command line\n\n1. Open a terminal window.\n\n2. Enter the following command:\n\n gcloud projects add-iam-policy-binding [PROJECT_ID] --member=[MEMBER] \\\n --role=[ROLE] [GCLOUD_WIDE_FLAG ...]\n\n Where:\n - `[PROJECT_ID]` is the ID for your Google Cloud project.\n - `[MEMBER]` is the user you want to add.\n - `[ROLE]` is the IAM role you want to assign.\n\nFor more information on this command, see\n[gcloud projects add-iam-policy-binding](/sdk/gcloud/reference/projects/add-iam-policy-binding).\n\nGrant permissions to create and delete repositories\n---------------------------------------------------\n\n\u003cbr /\u003e\n\nIf granted this permission at the project level, users can create, update, and\ndelete repositories for the entire project.\n\n1. In the Google Cloud console, open Cloud Source Repositories in the [My source](https://source.cloud.google.com/) view tab\n\n2. Click the name of a Google Cloud project ID for a specific repository.\n\n The page displays a list of all repositories for that project.\n3. Click\n **Settings** *settings*.\n\n The **General settings** page opens.\n4. Click **Permissions**.\n\n The **Permissions** page opens.\n5. In the **Members** field, enter the user's email address.\n\n6. In the **Role** drop-down list, select\n **Source repository \\\u003e Source Repository Administrator**.\n\n7. Click **Add**.\n\nRemove a user's access\n----------------------\n\nThere may be cases where you need to remove a user's access to a repository or\nproject.\n\n### Remove access to a repository\n\n1. In the Google Cloud console, open Cloud Source Repositories in the [My source](https://source.cloud.google.com/) view tab\n\n2. Click on the name of a repository.\n\n The **Files** view opens.\n3. Click\n **Settings** *settings*.\n\n The **General settings** page opens.\n4. Click **Permissions**.\n\n5. Locate the role you want to remove, and then click\n **Delete** *delete*\n for that role.\n\n A confirmation dialog opens.\n6. Click **Remove**.\n\n### Remove access to a project\n\n1. In the Google Cloud console, open Cloud Source Repositories in the [My source](https://source.cloud.google.com/) view tab\n\n2. Click the name of a Google Cloud project ID for a specific repository.\n\n The page displays a list of all repositories for that project.\n3. Click\n **Settings** *settings*.\n\n The **General settings** page opens.\n4. Click **Permissions**.\n\n The **Permissions** page opens.\n5. Locate the role you want to remove, and then click\n **Delete** *delete*\n for that role.\n\n A confirmation dialog opens.\n6. Click **Remove**.\n\nWhat's next\n-----------\n\n- Learn more about\n [Cloud Source Repositories and access control](/source-repositories/docs/configure-access-control).\n\n- Learn more about [IAM](/iam/docs)."]]