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

# GitHub Integration Setup

> Step-by-step guide to generating a GitHub Personal Access Token (PAT) and linking your repositories to your AurInfer character.

# Setting Up the GitHub Integration

Connecting your GitHub account to AurInfer takes just 2 minutes. Follow this step-by-step guide to generate a token, connect your account, and link your repositories.

<Steps>
  <Step title="Step 1: Generate a GitHub Personal Access Token (PAT)">
    1. Log in to your GitHub account and open **[GitHub Settings → Developer Settings → Personal access tokens](https://github.com/settings/tokens)**.
    2. Click **Generate new token (classic)** (or Fine-grained token).
    3. Enter a descriptive token name, such as `AurInfer Coder`.
    4. Select an expiration (e.g. 90 days, or Custom).
    5. Check the following permission scopes:
       * `repo` (Full control of private repositories — gives read and write access to code, commits, branches, and PRs).
       * *(Optional)* `workflow` (If you want the AI to update GitHub Actions workflow files).
    6. Click **Generate token** at the bottom and copy your token string (starts with `ghp_`).
  </Step>

  <Step title="Step 2: Add Your Account in AurInfer Dashboard">
    1. In your AurInfer Dashboard, navigate to **GitHub → Accounts** in the sidebar.
    2. Click **+ Connect GitHub Account**.
    3. Enter an Account Label (e.g. `Personal GitHub` or `Work Account`).
    4. Paste your token into the **Personal Access Token** field.
    5. Click **Verify & Connect Account**. AurInfer will validate your token with GitHub and display your profile username and avatar.
  </Step>

  <Step title="Step 3: Link Repositories to Your Character">
    1. Once your account is connected, open **GitHub → Coding Studio** or **GitHub → Settings**.
    2. Click the repository dropdown selector at the top and select **+ Add Repository**.
    3. Search and select the repository you want this AI character to work on.
    4. Choose the default branch (usually `main` or `master`).
    5. Click **Link Repository**.
  </Step>
</Steps>

***

## Managing Connected Accounts

You can connect multiple GitHub accounts (such as a personal account and an organization account):

* **Health Status**: Each account displays its current status (`Active`, `Invalid`, or `Expired`).
* **Token Re-Validation**: If your token expires or you update its permissions on GitHub, click **Re-validate** in the Accounts tab to refresh the token without breaking linked repositories.
* **Disconnecting**: You can unlink individual repositories or disconnect an account at any time with one click.

***

## Next Steps

Now that your repository is linked, head over to the **[Coding Studio Guide](/Integrations/GitHub/coding-studio)** to run your first coding session!
