> ## Documentation Index
> Fetch the complete documentation index at: https://nango-wari-add-support-for-humaans.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Github (Personal Access Token) - How do I link my account?

# Overview

To authenticate with Github (Personal Access Token), you need:

1. **Personal Access Token** - A key that grants Nango permission to interact with Github's APIs resources and services.

This guide will walk you through obtaining your Personal Access Token within Github.

### Prerequisites:

* You must have an account with Github.

### Instructions:

#### Step 1: Finding Your Personal Access Token

<Note>GitHub provides two types of tokens for authentication: Classic Personal Access Tokens (PATs) and Fine-Grained Personal Access Tokens. This guide will focus on generating Fine-grained PATs as Github recommends this over the other since it provides better security.</Note>

1. Log in to your [Github](http://github.com/) account.
2. In the upper-right corner of any page on GitHub, click your profile photo, then click  Settings.

<img src="https://mintcdn.com/nango-wari-add-support-for-humaans/r8shBg5K5lLT40t5/integrations/all/github-pat/settings.png?fit=max&auto=format&n=r8shBg5K5lLT40t5&q=85&s=ba2f059a81631dc43aee5b193365c0ca" width="3022" height="1242" data-path="integrations/all/github-pat/settings.png" />

3. In the left sidebar, click  **Developer settings**.

<img src="https://mintcdn.com/nango-wari-add-support-for-humaans/r8shBg5K5lLT40t5/integrations/all/github-pat/developer_settings.png?fit=max&auto=format&n=r8shBg5K5lLT40t5&q=85&s=36db3e757411652214c6e1ce4a24d85e" width="3022" height="1174" data-path="integrations/all/github-pat/developer_settings.png" />

4. In the left sidebar, under **Personal access tokens**, click **Fine-grained tokens**.
5. Click **Generate new token**.

<img src="https://mintcdn.com/nango-wari-add-support-for-humaans/r8shBg5K5lLT40t5/integrations/all/github-pat/fine_grained_tokens.png?fit=max&auto=format&n=r8shBg5K5lLT40t5&q=85&s=65be1ba740ba33bd93cb74abef01ea9c" width="3022" height="1174" data-path="integrations/all/github-pat/fine_grained_tokens.png" />

6. Under **Token name**, enter a name for the token.
7. Under **Expiration**, select an expiration for the token. Infinite lifetimes are allowed but may be blocked by a maximum lifetime policy set by your organization or enterprise owner.
   <Tip>Optionally, under **Description**, add a note to describe the purpose of the token</Tip>
8. Under **Resource owner**, select a resource owner. The token will only be able to access resources owned by the selected resource owner.
   <Tip>Optionally, if the resource owner is an organization that requires approval for fine-grained personal access tokens, below the **resource owner**, in the box, enter a justification for the request. </Tip>
9. Under **Repository access**, select which repositories you want the token to access.
10. If you selected **Only select repositories** in the previous step, under the **Selected repositories** dropdown, select the repositories that you want the token to access.
11. Under **Permissions**, select which permissions to grant the token.
12. Click **Generate token**.

<img src="https://mintcdn.com/nango-wari-add-support-for-humaans/r8shBg5K5lLT40t5/integrations/all/github-pat/pat_form.png?fit=max&auto=format&n=r8shBg5K5lLT40t5&q=85&s=a3699424e3ae15c42cd8b79ce600170c" width="3022" height="1444" data-path="integrations/all/github-pat/pat_form.png" />

#### Step 2: Enter credentials in the Connect UI

Once you have your **Personal Access Token**:

1. Open the form where you need to authenticate with Github (Personal Access Token).
2. Enter your **Personal Access Token** in its respective field.
3. Submit the form, and you should be successfully authenticated.

<img src="https://mintcdn.com/nango-wari-add-support-for-humaans/r8shBg5K5lLT40t5/integrations/all/github-pat/form.png?fit=max&auto=format&n=r8shBg5K5lLT40t5&q=85&s=289f6f253241407be41be26be6162c01" style={{maxWidth: "450px" }} width="1000" height="1396" data-path="integrations/all/github-pat/form.png" />

You are now connected to Github (Personal Access Token).
