# GitHub

import { Steps } from "@astrojs/starlight/components"
import Prereqs from "@docs/Prereqs.astro"
import UiWalkthrough from "@docs/UiWalkthrough.astro"

Connect the Ren GitHub App to your organization so agents can clone repos, push commits, open pull requests, and comment on issues, all inside their sandbox.

<Prereqs>
  - A Ren account with admin access to your organization - A GitHub account with permission to install GitHub Apps - At
  least one [project](/docs/deep-dives/concepts/compute/projects/) where you want to attach a repo
</Prereqs>

## Install the GitHub App

<UiWalkthrough>
  {/* TODO(demo): screen recording – GitHub App install flow and repo selection, ~10s loop */}
</UiWalkthrough>

<Steps>

1. Open **Settings → Integrations → GitHub** in the Ren dashboard.

2. Click **Connect GitHub**. You'll be redirected to GitHub to install the Ren GitHub App.

3. Choose which repositories the app can access (all or selected repos).

4. After approval, you're returned to Ren. The installation is now linked to your organization.

</Steps>

## Attach a repo to a project

Once the GitHub App is installed, you can bind a repository to any project. Agents in that project will clone the repo into their sandbox and can push branches, open PRs, and more.

<Steps>

1. Open the project you want to configure.

2. In **Project settings → Git repo**, select the repository from the dropdown.

3. Save. The next session in this project will automatically clone the repo.

</Steps>

## Connect your personal GitHub account (optional)

For operations that require a user-level OAuth token (such as commenting on behalf of a specific user), connect your personal GitHub account under **Settings → Integrations → GitHub → Connect account**.

## Disconnect GitHub

In **Settings → Integrations → GitHub**, click **Disconnect**. This removes the GitHub App installation and revokes Ren's access to your repositories.