この手順は、GitHub Enterprise Cloud ソースコード リポジトリを Google で使用するアプリケーション デベロッパー、プラットフォーム管理者、セキュリティ マネージャーを対象としています。 具体的には、 Gemini Code Assist で GitHub Enterprise Cloud リポジトリを使用できます。
Developer Connect の詳細については、 Developer Connect の概要をご覧ください。
始める前に
-
ログイン Google アカウントにログインします。
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.-
GitHub Enterprise Cloud のアカウントにアクセスできることを確認します。
チームの作業を安全に保つため、このガイドの手順は、個人用アカウントではなく、ボット アカウントまたはチームで共有するアカウントを使用して完了することをおすすめします。
- GitHub Enterprise 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
ロールの付与については、プロジェクト、フォルダ、組織へのアクセス権の管理をご覧ください。