Enable and disable the service

This page describes the steps required to enable or disable Cloud Source Repositories.

Enable the service

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Google Cloud project.

  4. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  5. Make sure that billing is enabled for your Google Cloud project.

  6. Install the Google Cloud CLI.
  7. To initialize the gcloud CLI, run the following command:

    gcloud init
  8. Verify that you have the latest version of Git.
  9. If you have not configured your user credentials in Git, follow the first time setup instructions.
  10. Enable the Cloud Source Repositories API in the Google Cloud console or with the following Google Cloud CLI command:
    gcloud services enable sourcerepo.googleapis.com

Disable the service

  1. Before you disable the Cloud Source Repositories API, ensure that all code that you want to keep is available in another location.

  2. It's recommended that you delete repositories before you disable the API.

  3. To disable Cloud Source Repositories, run the following command for your current project:

    gcloud services disable sourcerepos.googleapis.com