# Connect GitHub

Connect GitHub so Zero Cool can audit your private repositories. You need the Admin role.
Public repositories need no connection.

## Ask your agent

> Connect GitHub to my Zero Cool workspace.

The agent runs `zerocool github connect` and gives you a link. Open it in a browser where you are signed in to Zero Cool.

## In the portal

1. Open **Settings → Integrations**.
2. Under **GitHub repositories**, select **Install on GitHub**.
3. On GitHub, install the app and choose the repositories Zero Cool may read.
4. Back in Zero Cool, select **Connect GitHub**.
5. Under **Choose accounts to connect**, select the accounts. Select **Connect selected** within 10 minutes.
   If an account is missing, select **Check GitHub again**.

Your repositories now appear in **New audit**.
To change the repositories, select **Manage access**. To remove the connection, select **Disconnect**.
Disconnect does not uninstall the app from GitHub.

## CLI

```sh
zerocool github connect
```

An Admin's API key with the Member role or higher can start it. The command prints a URL.
Open it in a browser signed in as the person who created the API key.
On GitHub, authorize with the GitHub account that has the Zero Cool app installed. Its name and email can differ from your Zero Cool account.
