> ## Documentation Index
> Fetch the complete documentation index at: https://docs.resolve.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Git on Cloud

Git on Cloud runs Git integration in Resolve-managed cloud infrastructure. No Satellite deployment is required.

## When to Use It

Use Git on Cloud when:

* You want the fastest setup path
* You cannot deploy a satellite in your environment

Use [Git on Satellite](/git-on-satellite) instead if repository access must stay inside your own cluster/network.

## Prerequisites

* Repositories must be reachable from Resolve cloud
* For GitHub managed auth: GitHub access to install/authorize Resolve
* For GHE (BYO GitHub App) auth: a GitHub App you own on the target GitHub instance, App ID, installation ID, and private key (PEM). See [App for GitHub → Bring Your Own GitHub App](/app-for-github#bring-your-own-github-app) for app creation steps and required permissions.
* For token auth: provider username + token with required repo permissions

## Setup

### Option 1: GitHub Managed Auth (Recommended)

1. Open [**Git Integrations**](https://app0.resolve.ai/integrations/git/edit)

2. Create a **Cloud** Git connection

   <img src="https://mintcdn.com/resolveai-0e94a547/TSKPziqa8xE8YA7n/images/git/gitOnCloud.png?fit=max&auto=format&n=TSKPziqa8xE8YA7n&q=85&s=bb07d60b9387e430084a05a6555bb2d5" alt="Choose Cloud when creating a Git connection" width="1974" height="1978" data-path="images/git/gitOnCloud.png" />

3. Select **GitHub** auth

   <img src="https://mintcdn.com/resolveai-0e94a547/TSKPziqa8xE8YA7n/images/git/gitGithubConnect.png?fit=max&auto=format&n=TSKPziqa8xE8YA7n&q=85&s=4f87ec86d3737396d6aebf8167bfc26c" alt="Configure a Git cloud connection with GitHub authentication" width="1974" height="1978" data-path="images/git/gitGithubConnect.png" />

4. Complete the GitHub authorization/install flow

   <img src="https://mintcdn.com/resolveai-0e94a547/TSKPziqa8xE8YA7n/images/git/gitGithubInstall.png?fit=max&auto=format&n=TSKPziqa8xE8YA7n&q=85&s=d0f836236a1ff5bdd2762ba8861d517b" alt="Select workspace to complete GitHub authorization for cloud Git" width="1974" height="1978" data-path="images/git/gitGithubInstall.png" />

5. Select repositories

6. Verify health check and repository listing

### Option 2: Bring Your Own GitHub App (GHE)

Use this option when you want to connect Resolve via a GitHub App that **you** own and operate. It works for any GitHub variant: github.com, GitHub Enterprise Cloud, or GitHub Enterprise Server (on-prem). The instance must be reachable from Resolve cloud.

<Info>
  **See [App for GitHub → Bring Your Own GitHub App](/app-for-github#bring-your-own-github-app) first.** It walks through creating the GitHub App, the recommended permissions, generating a private key, and capturing App ID / Installation ID / API base URL. Come back here once you have those four values.
</Info>

1. Create the GitHub App on your GitHub instance and install it on the target organization. See [App for GitHub → Bring Your Own GitHub App](/app-for-github#bring-your-own-github-app) for the full walkthrough; it covers github.com, GHE Cloud, and GHE Server.
2. Capture:
   * **API base URL** (e.g. `https://api.github.com` for github.com, or `https://ghe.your-company.com/api/v3` for GHE Server)
   * **App ID**
   * **Installation ID** (from the install URL, e.g. `.../settings/installations/<id>`)
   * **Private key** (PEM)
3. Open [**Git Integrations**](https://app0.resolve.ai/integrations/git/edit) and create a **Cloud** Git connection
4. Select **GHE** auth and fill in the four fields above
5. Save and verify health check and repository listing

### Option 3: Token Auth

1. Create a provider PAT with the required scopes. See [Creating access tokens](/git#creating-access-tokens) for step-by-step token setup for each provider (GitHub, GitLab, and others).

2. Open [**Git Integrations**](https://app0.resolve.ai/integrations/git/edit)

3. Create a **Cloud** Git connection

4. Select **Token** auth

5. Provide:

   * connection name
   * username
   * token
   * repository HTTPS URLs

   <img src="https://mintcdn.com/resolveai-0e94a547/TSKPziqa8xE8YA7n/images/git/gitCloudToken.png?fit=max&auto=format&n=TSKPziqa8xE8YA7n&q=85&s=52e6ad4dc757ce1df9dd31d2d964c6f0" alt="Configure token authentication for a cloud Git connection" width="1974" height="1978" data-path="images/git/gitCloudToken.png" />

6. Verify health check and repository listing

## Connection Schemas

### GitHub Auth Example

```json theme={null}
{
  "connection": {
    "authConfigs": {
      "githubApp": {
        "type": "github"
      }
    }
  }
}
```

### GHE (BYO GitHub App) Example

```json theme={null}
{
  "connection": {
    "authConfigs": {
      "myGheApp": {
        "type": "ghe",
        "ghe": {
          "baseUrl": "https://ghe.your-company.com/api/v3",
          "appId": "12345",
          "installationId": "67890"
        }
      }
    },
    "gheAuthCredentials": {
      "myGheApp": {
        "privateKey": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----\n"
      }
    }
  }
}
```

The same shape works for github.com (use `https://api.github.com` as `baseUrl`) and GitHub Enterprise Cloud.

### Token Auth Example

```json theme={null}
{
  "connection": {
    "authConfigs": {
      "prodGithubToken": {
        "type": "token",
        "tokenAuthRemoteURLs": [
          "https://github.com/org/repo-a.git",
          "https://github.com/org/repo-b.git"
        ]
      }
    },
    "tokenAuthCredentials": {
      "prodGithubToken": {
        "username": "your-username",
        "token": "your-token"
      }
    }
  }
}
```

### Optional Fields

```json theme={null}
{
  "connection": {
    "disableWrites": true,
    "disabledSubcommands": ["config", "remote"]
  }
}
```

* `disableWrites`
  * Set to `true` to force read-only mode for this integration.
  * Blocks write/remediation tools.
  * If omitted, default behavior is computed from auth type (`github` or `ghe` auth -> writes enabled by default, token-only -> read-only by default).

* `disabledSubcommands`
  * Blocks specific `git <subcommand>` operations even when other git tools are available.
  * Example: `["config", "remote"]` prevents running `git config` and `git remote`.
  * Useful as a hardening control to restrict subcommands you don't want resolve to run in your repositories.

## Writes, PRs, and Tool Access

* Read-only repository operations are always available (clone/fetch/search/read/history).
* Write/remediation behavior is controlled by `disableWrites`.
* If `disableWrites` is omitted:
  * defaults to `false` when a `github` or `ghe` auth config exists
  * defaults to `true` for token-only config
* Reading PR data and querying GitHub Actions / PR check status works with any auth that targets GitHub repos and carries the right scopes:
  * `github` and `ghe` auth, provided the GitHub App has the [recommended permissions](/app-for-github#step-3-set-repository-permissions)
  * `token` auth, when the repos are hosted on GitHub and the token grants the equivalent scopes (e.g. fine-grained PAT with `Actions: Read`, `Pull requests: Read`, `Checks: Read`, `Contents: Read`, `Metadata: Read`)

## FAQ

<Accordion title="Is token auth strictly read-only?">
  No. Token-based connections can use write/remediation tools when `disableWrites: false` and tool support is available.
</Accordion>

<Accordion title="Are SSH URLs supported?">
  No. Use HTTPS repository URLs.
</Accordion>
