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

> [!CAUTION]
> **Caution:** Effective June 17, 2024, Cloud Source Repositories isn't available
> to new customers. If your organization hasn't
> previously used Cloud Source Repositories, you can't enable the API or use
> Cloud Source Repositories. New projects not connected to an organization can't enable the
> Cloud Source Repositories API. Organizations that have used Cloud Source Repositories prior to
> June 17, 2024 are not affected by this change.

## Enable the service

1. Ensure you have the \`serviceusage.services.enable\` IAM permission on the project.
2. Enable the Cloud Source Repositories API with the following Google Cloud CLI command:  

   ```bash
   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](https://docs.cloud.google.com/source-repositories/docs/deleting-a-repository.md.txt) before you
   disable the API.

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

   ```bash
   gcloud services disable sourcerepo.googleapis.com
   ```