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

# GitHub Connector Onboarding Guide

> Generate a fine-grained token and connect your GitHub organization to Pavo.

## Prerequisites

* Admin or owner access to the GitHub organization you want to connect
* Access to Pavo platform

## Step 1: Generate a GitHub Personal Access Token (PAT)

### 1.1 Go to GitHub token settings

Navigate to: **GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens**

Direct link: [https://github.com/settings/tokens?type=beta](https://github.com/settings/tokens?type=beta)

<Note>
  Use **fine-grained tokens** over classic tokens. They allow repo-level scoping and are the recommended approach.
</Note>

### 1.2 Create a new token

Click **"Generate new token"** and fill in:

| Field              | Value                                         |
| ------------------ | --------------------------------------------- |
| **Token name**     | pavo-connector (or any descriptive name)      |
| **Expiration**     | 90 Days                                       |
| **Resource owner** | Select your GitHub organization (e.g. pavoai) |

<Note>
  If the org doesn't appear under Resource owner, an org admin needs to enable fine-grained PAT access: **Org Settings → Personal access tokens → Settings → Allow access via fine-grained personal access tokens**.
</Note>

### 1.3 Set repository access

Choose one of:

* **All repositories** — grants access to every repo in the org (use for full onboarding)
* **Only select repositories** — pick specific repos (use when scoping to a subset)

### 1.4 Set permissions

Under **Repository permissions**, grant:

| Permission        | Access level | Why                                             |
| ----------------- | ------------ | ----------------------------------------------- |
| **Contents**      | Read-only    | Read source code, files                         |
| **Metadata**      | Read-only    | List repos, branches, basic info (auto-granted) |
| **Pull requests** | Read-only    | Ingest PR data, reviews, comments               |

All other permissions can stay at **No access**.

These are the minimum permissions needed. Do not grant write access — Pavo only reads data.

### 1.5 Generate and copy

Click **"Generate token"**. Copy the token immediately — GitHub won't show it again.

The token will look like: github\_pat\_XXXX... (fine-grained) or ghp\_XXXX... (classic).

By default, fine-grained tokens targeting an org need admin approval before they become active. After generating, the token stays in a "pending" state until an org admin approves it under **Org Settings → Personal access tokens → Pending requests.** Ask your org admin to approve it, or have the admin generate the token directly to skip this step.

## Step 2: Connect GitHub to Pavo

### 2.1 Navigate to the connector page

In Pavo, go to **Connectors → GitHub**.

### 2.2 Fill in the fields

| Field            | What to enter                                                                   |
| ---------------- | ------------------------------------------------------------------------------- |
| **API Key**      | Paste the PAT you generated in Step 1                                           |
| **Organization** | Your GitHub org name (e.g. pavoai) — this is the org slug, not the display name |

### 2.3 Connect

Click **Connect**. If successful, the status changes from "Not Connected" to connected and Pavo begins ingestion.

## Notes

* Pavo ingests repos, PRs, and code. It does **not** write back to GitHub.
* One connector per org per project. To connect multiple orgs, create separate connectors.
* For classic tokens (ghp\_...): go to [https://github.com/settings/tokens](https://github.com/settings/tokens) and select scopes repo (read) and read:org. Fine-grained is preferred.
