Connecting a Hosted Repository

You can connect a GCP repository to a Git repository hosted on GitHub or Bitbucket. When you push changes to the hosted repository, the changes are automatically synchronized with the GCP repository.

Connecting a repository

To connect a GCP repository to a hosted repository:

  1. Open the source view in the console:

    Open the Source View in the Console

  2. Click Get Started.

  3. Select Automatically Mirror from GitHub or Bitbucket:

    Mirror from GitHub or Bitbucket

  4. Select your hosting service and click Connect.

  5. If you have not previously authorized access to the hosting service from Google Cloud Platform, read and consider the authentication request displayed in the authentication page that appears in your browser. Click Authorize Application if you consent to the request.

  6. Select a repository in the dialog box that is displayed. Select the Consent option if you consent to Google collecting and storing your authentication token.

    Choose repository

  7. Click Connect.

Disconnecting a repository

To disconnect a hosted repository:

  1. Click the Settings button View repository files in the source code browser.

  2. Click Disconnect.

After you have disconnected, the repository is deleted from the GCP repository.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Source Repositories