# GitHub integration

Authenticate your sessions to GitHub as you with the [Bitrise GitHub App](/bitrise-platform/repository-access/github-app-integration) integration. In every new session, `git clone`, `git push`, and the GitHub CLI (`gh`) work over HTTPS out of the box without needing to paste personal access tokens or manage SSH keys.

## Overview

To use the integration, install the Bitrise GitHub App to your organization then connect your GitHub account to Bitrise through the GitHub app.

When you enable the integration on the RDE page, Bitrise plants a short-lived GitHub access token on each new session machine, issued through your GitHub account connection on Bitrise (the Bitrise GitHub App):

- Tokens are valid for at most eight hours and refresh automatically for the whole lifetime of the session, including restores.
- No long-lived credential is ever stored on the machine.
- Commits you author in a session are attributed to your GitHub account, using your GitHub noreply email address so your real email address is never exposed.

A session you claim from a [warm pool](/bitrise-rde/configuration/warm-pools) gets the token when you claim it, in its System setup step. Its **On claim** hook and everything after it can use `git` and `gh` as you, but its **On create** hook ran before anyone owned the session and couldn't. See [Lifecycle hooks](/bitrise-rde/configuration/lifecycle-hooks#when-each-hook-runs).

## Installing the GitHub app to your organization

The integration needs two separate things on GitHub:

- **A Bitrise GitHub App installation**: gives the app access to repositories. The GitHub App must be installed to the account or organization that owns the repository on GitHub, and the app installation must be enabled for the repository.
- **Your GitHub account connection**: authorizes the Bitrise GitHub App to act as you. This is done through the Bitrise Connected accounts page, and is required even if the app is already installed to your organization. For details, see [Enabling the integration](#enabling-the-integration).

:::important

Connecting your account doesn't install the app. If the Bitrise GitHub App isn't installed to the organization that owns your repositories, the integration shows as connected but every clone of a private repository fails.

:::

If your Workspace already uses the GitHub App for CI, the app is installed: check that the installation is enabled for the repositories you need. 

If not, install the app as described in [Connecting a GitHub app from the Workspace settings page](/bitrise-platform/repository-access/github-app-integration#connecting-a-github-app-from-the-workspace-settings-page). If you are not authorized on GitHub to install the app, you can still request the installation. Once a GitHub Admin approves the installation, sessions can access the repositories.

## Enabling the integration

1. Open Bitrise.
1. 1. Log in to Bitrise and click the profile image in the upper right corner to open the dropdown menu.
1. Select the **Account settings** option.

   ![account-settings-page.png](/img/_paligo/uuid-b08c42b9-affd-b40d-3c6e-87410001d2fb.png)
1. Select **Connected accounts**, then open the **Git providers** tab.
1. On the **GitHub** card (described as "Connect via the Bitrise GitHub App"), select **Connect**. Don't use the **GitHub with OAuth** card: the integration needs the GitHub App connection.

   :::info[A Workspace-level connection isn't enough on its own]

   This integration issues tokens through your personal GitHub account connection. Even if your organization's admin already connected the Bitrise GitHub App for CI, you still need to connect your own account on the **Connected accounts** page. The Workspace's app installation is what gives your sessions access to the repositories.

   :::

1. In the [Bitrise RDE UI](/bitrise-rde/rde-options/bitrise-rde-ui), select **Saved Inputs** on the left, under **User settings**.
1. On the **GitHub** card, check that your account shows as connected, then enable the toggle.

   ![The GitHub card on the Saved Inputs page, connected and ready to enable](/img/rde/2026-07-31-rde-github-integration-card.png)

New sessions you create from this point get automatic GitHub access. Sessions created before you enabled the integration are not changed.

## Repositories you can access

Sessions act as you through the Bitrise GitHub App, so a session can access the repositories that meet all of the following conditions:

- The GitHub App is installed to the account or organization that owns the repository on GitHub.
- The app installation is enabled for the repository.
- Your GitHub user account can access the repository on GitHub.

:::info[Clone fails with a 403 error or repository not found]

If cloning a private repository that you can open in the browser fails with `remote: Write access to repository not granted`, `The requested URL returned error: 403`, or `repository not found`, the Bitrise GitHub App isn't installed to the organization that owns the repository, or the installation isn't enabled for that repository. Ask a GitHub Admin of the organization to install the app or enable it for the repository: see [Installing the GitHub app to your organization](#installing-the-github-app-to-your-organization). You don't need to reconnect your account afterwards.

:::

To check which repositories the app is installed on:

1. On GitHub, open the [installed GitHub Apps](https://github.com/settings/installations) page for your account, or your organization's, if the app is installed at the organization level.
1. Find **Bitrise** in the list and select **Configure**.
1. Under **Repository access**, review the repositories the installation is scoped to.

## Disabling the integration

Disabling the integration stops credential issuance immediately: new sessions no longer receive credentials, running sessions immediately stop being able to refresh theirs, and the most recently issued token expires within eight hours.

1. In the [Bitrise RDE UI](/bitrise-rde/rde-options/bitrise-rde-ui), select **Saved Inputs** on the left, under **User settings**.
1. On the **GitHub** card, turn off the toggle.
