이 안내는 Google과 함께 Bitbucket Cloud 소스 코드 저장소를 사용하려는 애플리케이션 개발자, 플랫폼 관리자, 보안 관리자를 대상으로 합니다. 특히 Gemini Code Assist와 함께 Bitbucket Cloud 저장소를 사용할 수 있습니다.
Developer Connect에 대한 자세한 내용은 Developer Connect 개요를 참조하세요.
시작하기 전에
-
로그인하여 Google 계정을 사용하세요.
아직 계정이 없으면 새 계정을 등록하세요.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Developer Connect API.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Developer Connect API.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.-
Bitbucket Cloud의 계정에 액세스할 수 있는지 확인합니다.
팀의 작업을 안전하게 유지하려면 개인 계정이 아닌 봇 계정 또는 팀에서 공유하는 계정을 사용하여 이 가이드의 작업을 완료하는 것이 좋습니다.
- Bitbucket Cloud 저장소를 소유하고 있거나 공유 저장소에 대한 관리자 수준 권한이 있는지 확인합니다.
- (선택사항) Developer Connect에서 만드는 인증 보안 비밀을 암호화하기 위한 고객 관리 암호화 키(CMEK)를 만듭니다.
- (선택사항) 이 가이드의 명령줄 안내를 사용하려면 다음 단계를 완료하세요.
- Google Cloud CLI 설치 이전에 gcloud CLI를 설치한 경우
사용 가능한 최신 버전을 사용하고 있는지 확인합니다.
gcloud components update - 다음 명령어를 실행하여 Developer Connect 서비스 계정
을 만듭니다. 여기서 PROJECT_ID는 Google Cloud 프로젝트 ID입니다.
gcloud beta services identity create \ --service=developerconnect.googleapis.com \ --project=PROJECT_ID
- Google Cloud CLI 설치 이전에 gcloud CLI를 설치한 경우
사용 가능한 최신 버전을 사용하고 있는지 확인합니다.
Developer Connect를 사용 설정하면 Secret Manager API도 사용 설정됩니다.
필요한 역할
연결 및 링크를 만드는 데 필요한 권한을 얻으려면 관리자에게 다음 IAM 역할을 부여해 달라고 요청하세요.
-
프로젝트 소유자가 아닌 경우:
Developer Connect 관리자 (
roles/developerconnect.admin) 사용자 계정에 대한. -
CMEK를 사용하여 Developer Connect에서 만드는 보안 비밀을 암호화하려는 경우:
Cloud KMS CryptoKey 암호화/복호화 (
roles/cloudkms.cryptoKeyEncrypterDecrypter) Secret Manager 서비스 계정에. -
gcloud CLI를 사용하여 이 가이드의 단계를 완료하려는 경우:
Secret Manager 관리자 역할 (
roles/secretmanager.admin) Developer Connect 서비스 계정에 대한. -
콘솔을 사용하여 이 가이드의 단계를 완료하려는 경우:
프로젝트 IAM 관리자 (
roles/resourcemanager.projectIamAdmin) 사용자 계정에 대한. Google Cloud
역할 부여에 대한 자세한 내용은 프로젝트, 폴더, 조직에 대한 액세스 관리를 참조하세요.
커스텀 역할이나 다른 사전 정의된 역할을 통해 필요한 권한을 얻을 수도 있습니다.
액세스 토큰 만들기
다음 단계에 따라 Bitbucket Cloud에서 개인 액세스 토큰을 만듭니다.
다음 단계에 따라 Bitbucket Cloud에서 두 개의 액세스 토큰을 만듭니다. 이것은 저장소 액세스 토큰, 프로젝트 액세스 토큰 또는 작업공간 액세스 토큰일 수 있습니다.
사용할 액세스 토큰 유형의 안내를 선택합니다.
다음 범위로 첫 번째 토큰을 만듭니다.
- 저장소: 읽음.
- pull 요청: 읽기.
- 웹훅: 읽기 및 쓰기.
Developer Connect에서는 이를 승인자 액세스 토큰 이라고 합니다.
다음 범위로 두 번째 토큰을 만듭니다.
- 저장소: 읽음.
Developer Connect에서는 이를 읽기 액세스 토큰 이라고 합니다.
Bitbucket Cloud에서 토큰 수명을 관리할 책임은 사용자에게 있습니다. Bitbucket Cloud 토큰은 만료되지 않으며 취소할 때까지 유효합니다.
일부 유형의 Bitbucket 토큰은 유료 요금제에서만 사용할 수 있는 프리미엄 기능입니다. 자세한 내용은 Bitbucket Cloud 토큰을 참조하세요.
다음 절차에서 사용할 액세스 토큰을 복사합니다.
연결 만들기
이 섹션에서는 Developer Connect와 Bitbucket Cloud 간의 연결을 만드는 방법을 설명합니다. 콘솔을 사용하는 경우 연결 설정을 완료하면서 저장소에 링크 추가를 시작할 수도 있습니다. Google Cloud
새 Bitbucket Cloud 연결을 만들려면 다음 옵션 중 하나를 선택합니다.
콘솔
다음 단계를 완료하여 연결을 시작합니다.
콘솔에서 Developer Connect 를 엽니다. Google Cloud