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

# Connect GitHub

> Let agents work on your repositories in cloud sessions, and what happens to your code

Cloud sessions can start on one of your GitHub repositories. You connect
GitHub once, choose which repositories Orchestra may use, and anyone in your
workspace can then start a session on them.

## Connect

1. Open **Settings**, then **Integrations**.
2. Under **Code**, click **Connect GitHub**.
3. On GitHub's screen, choose the account or organization, then **Only select
   repositories** and pick the ones you want. GitHub shows what Orchestra
   asks for: read access to code and metadata.
4. GitHub asks you to authorize Orchestra. This lets Orchestra check that you
   can reach the repositories you chose. It is used once and given back.
5. You land back in Settings with your repositories listed, each with who
   connected it and when.

If you are a member of an organization but not an owner, GitHub sends your
request to the organization's owners. Once one of them approves it, connect
again from Settings.

Only repositories you can reach on GitHub yourself are connected, even if the
app is installed on more.

## What happens to your code

* When a session starts on a repository, Orchestra copies it into a private
  virtual machine that runs only that session.
* That machine can reach only GitHub and the package registries it needs to
  install dependencies. Every other address on the internet is blocked. The
  agent talks to its AI model through Orchestra, never directly.
* Orchestra asks GitHub to read your code, not to change it. Agents can commit
  inside their session, but cannot push to GitHub.
* Each GitHub credential works for one repository and expires within an hour.
  It is never written to the machine's disk.
* When a session goes quiet, its machine is paused and saved as a snapshot:
  its files and memory, which include your code and the agent's changes.
  Snapshots are encrypted with AWS KMS and deleted once the session has been
  idle for a week.
* Anyone in your workspace can start a session on a connected repository.

## Remove a repository

In **Settings, Integrations**, click **Remove** next to it. New sessions on it
are refused right away. A session already working on it can keep its current
access for up to an hour, until its last GitHub credential expires. To cut
access at once, also remove the repository from the Orchestra app on GitHub,
using **Manage on GitHub**.

A removed repository stays listed under **Removed**, with who removed it and
when. **Put back** reconnects it.

## When a session cannot open a repository

The session does not start, and the message says what to do:

* The repository is not connected: an admin can connect it in Settings.
* Orchestra's app cannot reach it: check the repository is still selected for
  the app on GitHub.
* GitHub did not answer: try again in a minute.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.