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

# Connecting a Repository

> What access Earnie asks for when you connect a repository, how the GitHub App connection is made, and how to manage or disconnect it afterwards.

## What Earnie Asks For

Earnie asks for read-only access, scoped to the repositories you pick, and it tells you why it needs each permission before you approve anything.

| Permission                      | Why Earnie Needs It                                                               |
| ------------------------------- | --------------------------------------------------------------------------------- |
| Repository contents (read only) | Source is read at scan time so it can be fingerprinted against the knowledgebase. |
| Metadata (read only)            | Repository names, default branch, and languages, to organise findings by project. |
| Pull requests (read & checks)   | So policy verdicts can be posted back onto a pull request.                        |

## How the Connection Is Made

1. Authorise Earnie to see which organisations you belong to. A short code is shown, enter it on GitHub in the window that opens.
2. Choose the organisation that will own the connection.
3. Earnie creates a private GitHub App owned by that organisation.
4. Install the app and choose which repositories it may read.

<Note>
  **Not an owner of the organisation?** Only an owner can install the app.
  Earnie will create a single-use hand-off link you can send to one. They
  complete the two steps on GitHub without needing an Earnie account, and your
  setup continues automatically once they're done.
</Note>

## Managing the Connection

You can add more organisations, change which repositories are shared, or disconnect entirely from **Settings → Integrations** at any time.

<Note>
  Disconnecting removes Earnie's access and stops future scans. The findings
  and decisions you've already recorded are kept.
</Note>

## What's Next

Once a repository is connected, importing it kicks off [your first scan](/en/latest/earnie/getting-started/first-scan) automatically. The next step is watching that scan run through each stage and reading what it found.
