# Integrate a remote source code repository

> Link a repository for remote management, backup, and reuse of actions, blueprints, and UI extensions

---

Site [llms.txt](/llms.txt)

---

Cloud Management Platform (CMP) connects to a [GitHub](https://docs.github.com/) or [GitLab](https://docs.gitlab.com/) repository, so you can keep content under version control, back it up outside CMP, and reuse it across instances. Content is pushed and pulled from the object's own page, one item at a time.

## Prerequisites

- A repository in GitHub or GitLab.
- Credentials that can read from it to pull content into CMP.
- Credentials that can write to it to push content from CMP.

<div class="alert alert-info" role="alert"><div class="h4 alert-heading" role="heading">Permissions and tokens</div>


See the [GitHub](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) or [GitLab](https://docs.gitlab.com/user/profile/personal_access_tokens/) documentation for more about personal access tokens. A GitHub repository can also authenticate with an organization-owned GitHub App instead. See [GitHub App authentication](/docs/cmp/configure/integrations/source-code-repository/github-app-authentication/).
</div>


## Configure repository credentials

Set the credentials CMP uses when pushing commits on your behalf.

1. Select your **user icon**, then **My profile**.
1. Select the **Edit** icon next to **Repository Credentials**.
1. Provide the **Username** and a **Password** or **Token** with write access.

   ![Screenshot of the Edit Default Repository Credentials form.](/img/cmp/configure/integrations/source-code-repository/edit-repository-credentials.png)
1. Select **Save**.

These are your own credentials, and pushes are attributed to them. They are not needed to push through a GitHub connection that uses [GitHub App authentication](/docs/cmp/configure/integrations/source-code-repository/github-app-authentication/).

## Link a remote repository

1. Go to **Admin** > **Source Code Repositories**.
1. Select **New Source Code Repository**.
1. Select **GitHub Repository** or **GitLab Repository**.
1. Provide a **Label**, such as the repository's name in GitHub or GitLab.
1. Provide the **Repository URL**, such as `https://github.com/<organization>/<repository>`.
1. Optionally provide a **Description**.
1. Optionally name an **Auto import branch**. Blueprints on that branch are imported only when the **Refresh Blueprints from Remote Source** recurring job is enabled. On a new connection, type the branch name; when you edit the connection later, the field lists the repository's branches.
1. Optionally change the **Path to blueprints**, the folder blueprints are read from and written to. It defaults to `blueprints/`.
1. For a GitHub repository, select an **Authentication Method**: **Personal Access Token** (the default) or **GitHub App**. See [GitHub App authentication](/docs/cmp/configure/integrations/source-code-repository/github-app-authentication/).
1. Provide a **Username** and a **Password or Token** with at least read access. If the password vault feature is enabled, **Password or Token** offers **Locally Stored** or **Vault Managed**; select **Vault Managed** to read the secret from a configured vault provider. See [Use password vaults](/docs/cmp/configure/access-and-security/security/use-password-vaults/). If you selected **GitHub App**, select a **GitHub App Credential** instead.

   ![Screenshot of the New Repository form.](/img/cmp/configure/integrations/source-code-repository/new-repository.png)
1. Select **Create**.

## What CMP stores in the repository

Each kind of content has its own folder. Only the blueprints path is configurable on the connection; the rest are fixed.

| Content type | Folder | Topic |
| --- | --- | --- |
| Blueprints | `blueprints/` | [Blueprints as code](/docs/cmp/configure/integrations/source-code-repository/blueprints-as-code/) |
| Orchestration actions | `orchestration_actions/` | [Orchestration actions as code](/docs/cmp/configure/integrations/source-code-repository/orchestration-actions-as-code/) |
| Server actions | `server_actions/` | [Server actions as code](/docs/cmp/configure/integrations/source-code-repository/server-actions-as-code/) |
| Resource actions | `resource_actions/` | [Resource actions as code](/docs/cmp/configure/integrations/source-code-repository/resource-actions-as-code/) |
| Flow control actions | `flowcontrol_actions/` | [Flow control actions as code](/docs/cmp/configure/integrations/source-code-repository/flow-control-actions-as-code/) |
| Inbound webhooks | `webhooks/` | [Inbound webhooks as code](/docs/cmp/configure/integrations/source-code-repository/inbound-webhooks-as-code/) |
| Recurring jobs | `recurring_jobs/` | [Recurring jobs as code](/docs/cmp/configure/integrations/source-code-repository/recurring-jobs-as-code/) |
| Continuous Infrastructure Testing tests | `cit_tests/` | [Continuous Infrastructure Testing as code](/docs/cmp/configure/integrations/source-code-repository/cit-as-code/) |
| Shared modules | `shared_modules/` | [Shared modules as code](/docs/cmp/configure/integrations/source-code-repository/shared-modules-as-code/) |
| UI extensions | `extensions/` | [UI extensions as code](/docs/cmp/configure/integrations/source-code-repository/ui-extensions-as-code/) |

CMP also stores plugins in `plugins/` and MCP tool actions in `mcp_tool_actions/`. Custom forms are stored in `forms/` and custom form functions in `form_functions/`, both written when you push the blueprint or action that uses them rather than on their own.

## Related

- [CloudBolt Content Navigator](/docs/cmp/developer-resources/cloudbolt-content-navigator/): Browse and sync repository content by name in VS Code.

---

Section pages:

- [GitHub App authentication](/docs/cmp/configure/integrations/source-code-repository/github-app-authentication/): Authenticate a GitHub source code repository connection with an organization-owned GitHub App instead of a personal access token
- [Blueprints as code](/docs/cmp/configure/integrations/source-code-repository/blueprints-as-code/): Synchronize blueprints with a remote source code repository
- [Continuous Infrastructure Testing as code](/docs/cmp/configure/integrations/source-code-repository/cit-as-code/): Synchronize Continuous Infrastructure Testing tests with a remote source code repository
- [Flow control actions as code](/docs/cmp/configure/integrations/source-code-repository/flow-control-actions-as-code/): Synchronize flow control actions with a remote source code repository
- [Inbound webhooks as code](/docs/cmp/configure/integrations/source-code-repository/inbound-webhooks-as-code/): Synchronize inbound webhooks with a remote source code repository
- [Orchestration actions as code](/docs/cmp/configure/integrations/source-code-repository/orchestration-actions-as-code/): Synchronize orchestration actions with a remote source code repository
- [Recurring jobs as code](/docs/cmp/configure/integrations/source-code-repository/recurring-jobs-as-code/): Synchronize recurring jobs with a remote source code repository
- [Resource actions as code](/docs/cmp/configure/integrations/source-code-repository/resource-actions-as-code/): Synchronize resource actions with a remote source code repository
- [Server actions as code](/docs/cmp/configure/integrations/source-code-repository/server-actions-as-code/): Synchronize server actions with a remote source code repository
- [Shared modules as code](/docs/cmp/configure/integrations/source-code-repository/shared-modules-as-code/): Synchronize shared modules with a remote source code repository
- [UI extensions as code](/docs/cmp/configure/integrations/source-code-repository/ui-extensions-as-code/): Synchronize UI extensions with a remote source code repository
