# Connect your GitHub account

> Connect GitHub in Settings, choose which repositories the AirBuild GitHub App can reach, get past single sign-on, and turn Sign Commits with AirBuild on or off.

Source: https://air.build/docs/team/connect-github-account/

Your Agents work with GitHub as the GitHub account you connect. Which repositories they can reach is up to you: you grant them to the AirBuild GitHub App on GitHub. "Your agents work with GitHub as this account. Your password and tokens never reach them."

A Team's Agents use the GitHub connection of the Team's owner. If you're a member of someone else's Team, your own GitHub connection isn't used there; the owner connects GitHub for that Team.

## Open Settings › GitHub

**iPhone**

On iPhone, tap your photo in the top-right corner of Home, then **Settings**. On iPad, tap the gear (**Settings**) at the foot of the sidebar. Under **Connections**, tap **GitHub**.

**Mac**

Choose **AirBuild › Settings…** (**⌘,**), then click **GitHub** in the sidebar.

Searching Settings for **GitHub App** opens it too.

## Connect GitHub

1. Under **Account**, tap **Connect GitHub**.
2. Sign in to GitHub. On iPhone and iPad, GitHub's sign-in opens inside the app. On the Mac, it opens in your web browser; come back to AirBuild when you're done.
3. The row now shows **GitHub** with your GitHub name.

The page reads GitHub again each time you come back to the app, so you don't need to reopen it.

This GitHub account is also one you can sign in to AirBuild with. It's listed under **Connected Accounts** in Settings › [Account](https://air.build/docs/settings/account/#connected-accounts).

## Choose which repositories Agents can reach

Once GitHub is connected, the **GitHub App** section lists each GitHub account or organization the AirBuild GitHub App is installed on, with how many repositories it grants, for example "12 repositories". A person icon marks a personal account; a building, an organization.

1. Tap **Install AirBuild GitHub App** (shown when it isn't installed anywhere yet), or **Add Account…** to install it on one more account or organization.
2. On GitHub, pick the account or organization and choose the repositories.
3. Come back to AirBuild. The page keeps checking and shows the new installation.

To add or remove repositories later, tap the account's row. It opens GitHub's page for the app, where you change which repositories it reaches.

"Your agents can reach the repositories granted to these installations. Select an account to manage its repositories on GitHub."

### When an Agent asks in a chat

When an Agent needs a repository it can't reach, it asks in the chat with a **GitHub** card, for example "Needs access to the repository _owner/repo_. Grant it to the AirBuild app on GitHub." or "Needs access to repositories on the _account_ account. Install the AirBuild app on GitHub and choose which repositories to share." The Team's owner taps **Grant Access** and grants it on GitHub.

When an Agent asks you to pick a repository, the card says "Choose a GitHub repository to share." with **Choose Repository**.

Once it's answered, the card says "Access granted to" and the repository.

## Single sign-on

If an organization uses single sign-on, GitHub can hide it until you complete single sign-on.

| Notice | What to do |
| --- | --- |
| **Single Sign-On Required**: "GitHub hides _n_ organizations until you sign in again and complete single sign-on." | Tap **Sign In Again** and complete single sign-on when GitHub asks. |
| **Already Granted Access?**: "If your organization uses single sign-on, sign in to GitHub again and complete it when GitHub asks." | Shown when you went to GitHub to install the app and came back to an empty list. The grant may still be on its way, so wait a moment. If nothing shows, tap **Sign In Again** and complete single sign-on. |

The organization's repositories then show in the list.

## Sign Commits with AirBuild

**Sign Commits with AirBuild** is a switch for the Team you have open: "Commits your agents make show AirBuild as a co-author on GitHub." It's on for a new Team. When you're in more than one Team, the Team's name stands over the switch.

Only the Team's owner can change it. For a member it's dimmed. If the change can't be saved, an alert titled **Sign Commits with AirBuild** gives the reason and the switch goes back.

## Questions

**The page says “GitHub needs you to sign in again before your agents can reach repositories.”**

Tap **Sign In Again** on the **GitHub** row and sign in to GitHub.

**An organization's repositories don't show.**

Install the GitHub App on that organization with **Add Account…**. If the organization uses single sign-on, tap **Sign In Again** and complete it.

**The GitHub App section shows an error.**

The list couldn't be read. Tap **Try Again**.

**I made someone else the owner. Why can't the Agents use GitHub?**

They now use the new owner's GitHub. The Agents can't use GitHub until the new owner gives them access; they ask in a chat, and the new owner answers there.

**How do I bring an existing repository into a Project?**

See [Import a project from GitHub](https://air.build/docs/get-started/import-from-github/).
