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

# Code providers

> Connect GitHub, GitLab, Bitbucket, Cursor Origin, Gitea, or Perforce to Greptile.

Greptile reviews code from the following source code management (SCM) providers.

| Provider | Connection | Availability |
| - | - | - |
| GitHub Cloud (github.com) | Greptile Apps GitHub App | Greptile Cloud; all plans |
| GitLab.com | Access token and webhook | Greptile Cloud; all plans |
| Bitbucket Cloud | Greptile Forge app | Greptile Cloud; all plans |
| Cursor Origin (Beta) | Greptile Origin App | Greptile Cloud; all plans |
| GitHub Enterprise Server | Your instance | Greptile Enterprise; [Contact sales to enable](mailto:sales@greptile.com) |
| GitHub Enterprise Cloud with data residency (ghe.com) | Your instance | Greptile Enterprise; [Contact sales to enable](mailto:sales@greptile.com) |
| GitLab Self-Managed | Access token and webhook | Greptile Enterprise; [Contact sales to enable](mailto:sales@greptile.com) |
| Bitbucket Data Center | Bot user token and webhook | Greptile Enterprise; [Contact sales to enable](mailto:sales@greptile.com) |
| Gitea | Bot user token and webhook | Greptile Enterprise; [Contact sales to enable](mailto:sales@greptile.com) |
| Perforce (P4) with P4 Code Review | Deployment-specific setup | On-premises Greptile only |

GitHub Enterprise Server, GitHub Enterprise Cloud with data residency, GitLab Self-Managed, Bitbucket Data Center, and Gitea require Greptile Enterprise access. [Contact sales](mailto:sales@greptile.com) to enable them. Hosting your code provider and [hosting Greptile](/docs/deployment-options) are separate choices. Review credits and plan limits still apply.

## Before you connect

An organization admin connects providers from [Code Providers](https://app.greptile.com/connections/code-providers). Select the Greptile organization first, then select **Add Provider** or the provider's **Connect** action.

Connecting a provider does not enable reviews by itself. Link the organization, group, workspace, or project, then select and enable its repositories. After setup, open a pull request with automatic reviews enabled to check the connection.

## GitHub and GitLab

Follow the [GitHub and GitLab quickstart](/docs/quickstart) to install the GitHub App or add a GitLab token, link your organization or group, and enable repositories.

GitHub App webhooks are managed by the app. GitLab needs the webhook URL, secret, and events shown in Greptile. Copy those values from the setup screen.

For GitHub Enterprise Server, GitHub Enterprise Cloud with data residency, or GitLab Self-Managed, select the corresponding Enterprise or self-managed provider in **Code Providers** and enter your instance details. Greptile must be able to reach the instance, and the instance must be able to send events to Greptile. Contact support for help with private network access.

## Bitbucket Cloud

1. Open **Code Providers** and select **Bitbucket Cloud**.
2. Select **Install in Bitbucket** and install the Greptile Forge app in your workspace. Use a Bitbucket account with permission to install workspace apps.
3. Return to the setup panel. Enter the workspace slug or URL and open its Bitbucket settings.
4. In Bitbucket, select **Connect to Greptile** and sign in to Greptile.
5. Link the workspace to the selected Greptile organization.
6. Select the repositories to review and enable them.

<Note>
  Installing the app is only the first step. You must also connect the workspace and enable repositories. If the app is already installed, continue with workspace connection; do not install it again.
</Note>

The Forge app supplies credentials and delivers events. You do not need a personal access token or a manual webhook. To enable more repositories in a connected workspace, open that workspace's repository list in Greptile.

## Cursor Origin

Cursor Origin is available on all plans. The integration is in beta.

1. Open **Code Providers** and select **Add Provider → Cursor Origin**.
2. In Cursor, choose the namespace and repositories that Greptile can access, then approve the app installation.
3. Return to Greptile and select and enable the repositories to review.
4. Open a pull request with automatic reviews enabled to check the connection.

The Origin App supplies credentials and delivers events. You do not need a personal access token or a manual webhook. To change repository access later, open **Manage Origin installation** on the provider card.

## Bitbucket Data Center

Use a dedicated bot account with admin access to each project you will connect.

1. Sign in to Bitbucket as the bot. Open **Manage account → HTTP access tokens → Create token**.
2. Select **Project admin** and **Repository write** permissions. Create and copy the token. Use a user token, not a project or repository token.
3. In Greptile, open **Code Providers** and select **Bitbucket Data Center**.
4. Enter the instance URL and bot token. Include the instance base path, if present; do not include a project or repository path.
5. Link the projects, then select and enable repositories.

Greptile sets up the project webhook when you link a project. **Project write** permission is not enough for this step.

For manual setup, open the webhook configuration in Greptile. Copy its URL and secret into **Project settings → Webhooks** in Bitbucket. You can also configure a webhook in each selected repository. Enable these events:

* Repository push
* Pull request opened, source branch updated, modified, and reviewers updated
* Pull request comment added, merged, and declined

Keep the webhook enabled. Greptile must be able to reach the instance, and Bitbucket must be able to reach the webhook URL.

## Gitea

Create a bot account with access to the organizations and repositories that Greptile will review.

1. Sign in as the bot and open **User Settings → Applications**.
2. Create a token with **Repository and Organization Access: All (public, private, and limited)** and these permissions:
   * **issue**: Read and Write
   * **organization**: Read. Use Read and Write if Greptile will create an organization-level webhook.
   * **repository**: Read and Write
   * **user**: Read
3. Set all other permissions to **No Access**. Generate and copy the token.
4. In Greptile, open **Code Providers** and select **Gitea**. Enter the Gitea root URL and bot token.
5. Link the Gitea organization and complete the webhook setup shown in Greptile. Make the bot an organization owner, or have an administrator configure webhooks in each repository.
6. Select and enable repositories.

For webhook setup, copy the **Target URL** and **Secret** from Greptile into the organization's **Settings → Webhooks**, or into each selected repository's webhook settings. Enable these events:

* Push
* Pull Request and Pull Request Sync
* Pull Request Comment, Pull Request Review, and Pull Request Review Request
* Issue Comment

Confirm the webhook setup in Greptile. Greptile must be able to reach Gitea, and Gitea must be able to reach the webhook URL.

## Perforce (P4)

Greptile supports Perforce through **P4 Code Review**, formerly Helix Swarm, in on-premises deployments. This is not a Greptile Cloud connection.

Contact [sales@greptile.com](mailto:sales@greptile.com) to set up the deployment, service account, and depot paths. Greptile polls P4 Code Review for review activity. Pre-commit reviews use shelved changelists.

After setup, use the [Perforce configuration guide](/docs/code-review-bot/greptile-json-perforce) to add review settings at the **Context used** path shown in the review summary.

## When reviews do not start

* Confirm that the provider is connected to the correct Greptile organization and the repository is enabled.
* Check automatic review settings and filters in **Code Review Settings**.
* For Bitbucket Cloud, confirm both app installation and workspace connection are complete.
* For token-based providers, check token expiry, bot access, and webhook delivery results.
* For a private instance, check network access in both directions.

If setup remains blocked, contact [support@greptile.com](mailto:support@greptile.com). Do not send access tokens or webhook secrets.
