> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/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/jNxmsZ4pW0gKOBN-/integrations/all/github-pat/settings.png?fit=max&auto=format&n=jNxmsZ4pW0gKOBN-&q=85&s=75434b285881a6b851591b0631b7d34d" 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/jNxmsZ4pW0gKOBN-/integrations/all/github-pat/developer_settings.png?fit=max&auto=format&n=jNxmsZ4pW0gKOBN-&q=85&s=4ff949af2cdc9a9ebd30cb1b0f5ea205" 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/jNxmsZ4pW0gKOBN-/integrations/all/github-pat/fine_grained_tokens.png?fit=max&auto=format&n=jNxmsZ4pW0gKOBN-&q=85&s=fe10137ec30fcda769d10b4e6a588803" 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/jNxmsZ4pW0gKOBN-/integrations/all/github-pat/pat_form.png?fit=max&auto=format&n=jNxmsZ4pW0gKOBN-&q=85&s=acc62ad220633759d7b2e01fccb06ed8" 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/jNxmsZ4pW0gKOBN-/integrations/all/github-pat/form.png?fit=max&auto=format&n=jNxmsZ4pW0gKOBN-&q=85&s=b03068f43507a8d919ba45e5423c081a" style={{maxWidth: "450px" }} width="1000" height="1396" data-path="integrations/all/github-pat/form.png" />

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