> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.aosplane.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.aosplane.io/_mcp/server.

# Repositories

A project's sessions can only use the repositories you link to it. Link them on the project's **Repositories** tab, then use **Repository setup** to give their sessions variables, a setup script, internet access and QA checks.

> **Note**
>
> Owners, Admins and Engineers link and unlink repositories. Viewers can see the list. Only Owners and Admins change **Repository setup**; Engineers can inspect it.

## Link a repository

#### Open the project's Repositories tab

In your project, choose **Repositories**.

#### Find the repository

Search, or filter by **Private**, **Public** or **Needs attention**.

#### Link it

Choose **Link**. Its status changes to **Linked**, and sessions in this project can use it.

![Project repositories page with the All, Private, Public and Needs attention filters and a table of repositories with Access, Default branch, Used by and Status columns](/_fern-files/_img/f24607924214401dc867d9cbe615c494b7c248bfc4a33e7d54c84115e8f6bcfe.webp)

You can link a repository only if the organization's GitHub App can reach it and your GitHub account has write access to it. If not, the row offers **Connect GitHub** or **Configure access**. See [Connect GitHub](/github).

## Set up a repository's sessions

#### Open Repository setup

In your project, choose **Settings**, then **Repository setup**.

#### Open the repository

Choose **Configure** on the repository's card.

#### Make your changes

Use the tabs in the table below.

#### Save

Save on the tab you changed: **Save settings** on Network, Setup script and QA checks, or **Save variables** on Variables. New sessions use the changes; sessions already running keep what they started with.

![Repository setup sheet with the Variables, Network, Setup script, QA checks and Credentials tabs, open on Variables with two variables entered and one marked Secret](/_fern-files/_img/0d36ee7cbf11f0b6af6c2201cb386df656dadfee0c62455bf5b41ec722b88c6c.webp)

| Tab              | What it sets                                                                                                                       |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **Variables**    | Environment variables. Turn on **Secret** to hide a value; plain values are readable.                                              |
| **Network**      | **No network**, **Trusted hosts** (package registries and toolchain hosts), **Full access** (any public host) or **Custom hosts**. |
| **Setup script** | Commands that run before the agent starts, such as installing dependencies. Timeout 1 to 600 seconds.                              |
| **QA checks**    | Commands that prove a change works, such as your tests. See [QA checks](/qa-checks).                                               |
| **Credentials**  | API credentials AOSplane adds to requests for the hosts you name. The agent never sees the values.                                 |

## Good to know

* Forks, archived and disabled repositories can't be linked.
* **Used by** shows how many of the project's agents use a repository. Unlinking one asks you to confirm, and sessions in the project can't use it afterwards. You can link it again later.
* New repositories on GitHub show up within a minute or two. Choose **Sync now** to check right away.
* **Needs attention** collects repositories that need the GitHub App or your GitHub account before you can link them.

## Related

* [Connect GitHub](/github)
* [QA checks](/qa-checks)
* [Agents](/agents)
* [Sandboxes](/sandboxes)