비공개 네트워크에서 호스팅되는 GitHub Enterprise 저장소에 연결

이 페이지에서는 Developer Connect 및 서비스 디렉터리를 사용하여 비공개 네트워크에서 호스팅되는 GitHub Enterprise 저장소에 연결하는 방법을 설명합니다. 콘솔 또는 Google Cloud CLI를 사용하여 이러한 작업을 완료할 수 있습니다. Google Cloud

이 안내는 Google과 함께 GitHub Enterprise 소스 코드 저장소를 사용하려는 애플리케이션 개발자, 플랫폼 관리자, 보안 관리자를 대상으로 합니다. 특히 GitHub Enterprise 저장소를 Gemini Code Assist와 함께 사용할 수 있습니다.

Developer Connect에 대한 자세한 내용은 Developer Connect 개요를 참조하세요.

시작하기 전에

  1. 로그인하여 Google 계정을 사용하세요.

    아직 계정이 없으면 새 계정을 등록하세요.

  2. 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Developer Connect and Service Directory APIs.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. 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.

    Enable the APIs

  5. 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the Developer Connect and Service Directory APIs.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. 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.

    Enable the APIs

  8. Developer Connect를 사용 설정하면 Secret Manager API도 사용 설정됩니다.

  9. GitHub Enterprise의 계정에 액세스할 수 있는지 확인합니다.

    팀의 작업을 안전하게 유지하려면 개인 계정이 아닌 봇 계정 또는 팀에서 공유하는 계정을 사용하여 이 가이드의 작업을 완료하는 것이 좋습니다.

  10. GitHub Enterprise 저장소를 소유하고 있거나 공유 저장소에 대한 관리자 수준 권한이 있는지 확인합니다.
  11. GitHub Enterprise 조직에서 저장소를 사용하는 경우 GitHub 앱 관리자 권한이 있는지 확인합니다.

  12. 비공개 네트워크에 연결하기 위한 서비스 디렉터리 서비스 리소스가 있는지 확인하거나 서비스 디렉터리 서비스 리소스를 만듭니다. Developer Connect와 함께 사용하는 동일한 프로젝트에서 서비스 디렉터리 서비스 리소스를 만들거나 다른 프로젝트를 사용할 수 있습니다.

    외부 네트워크에 연결하려면 서비스 디렉터리를 다르게 구성해야 할 수 있습니다 Google Cloud. 서비스 디렉터리를 사용하여 외부 호스트에 연결을 참조하세요. Google Cloud

  13. (선택사항) Developer Connect에서 만드는 인증 보안 비밀을 암호화하기 위한 고객 관리 암호화 키(CMEK)를 만듭니다.
  14. (선택사항) 이 가이드의 명령줄 안내를 사용하려면 다음 단계를 완료하세요.
    1. Google Cloud CLI를 설치합니다. 이전에 gcloud CLI를 설치한 경우 최신 버전을 사용할 수 있는지 gcloud components update를 실행하여 확인합니다.
    2. 다음 명령어를 실행하여 Developer Connect 서비스 계정 을 만듭니다. 여기서 PROJECT_IDGoogle Cloud 프로젝트 ID입니다.
              gcloud beta services identity create \
                  --service=developerconnect.googleapis.com \
                  --project=PROJECT_ID
              

필수 IAM 권한 부여

연결 및 링크를 만드는 데 필요한 권한을 얻으려면 관리자에게 다음 IAM 역할을 부여해 달라고 요청하세요.

  • 프로젝트 소유자가 아닌 경우: Developer Connect 관리자 (roles/developerconnect.admin) 사용자 계정에 대한.
  • Developer Connect에서 만드는 보안 비밀을 암호화하기 위해 CMEK를 사용하려는 경우: Cloud KMS CryptoKey 암호화/복호화 (roles/cloudkms.cryptoKeyEncrypterDecrypter) Secret Manager 서비스 계정에 대한.
  • gcloud CLI를 사용하여 이 가이드의 단계를 완료하려는 경우: Secret Manager 관리자 역할 (roles/secretmanager.admin) Developer Connect 서비스 계정에 대한.
  • 콘솔을 사용하여 이 가이드의 단계를 완료하려는 경우: 프로젝트 IAM 관리자 (roles/resourcemanager.projectIamAdmin) 사용자 계정에 대한. Google Cloud

역할 부여에 대한 자세한 내용은 프로젝트, 폴더, 조직에 대한 액세스 관리를 참조하세요.

커스텀 역할이나 다른 사전 정의된 역할을 통해 필요한 권한을 얻을 수도 있습니다.