> For the complete documentation index, see [llms.txt](https://docs.hivel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hivel.ai/integrations/version-control/github/github-classic-token-recommended.md).

# GitHub - Classic Token (recommended)

To connect GitHub to Hivel using a Personal Access Token (PAT), particularly with a service account to avoid integrating personal repositories, follow these steps:

Quick start: skip the navigation - [open the token creation page](https://github.com/settings/tokens/new), then continue from Step 4. If the link doesn't take you there, follow from Step 1 below.

### **Steps to be followed**

#### **Step 1: Prepare a Service Account**

1. **Log into the GitHub service account:**
   * Use a dedicated service account that has access to the required repositories for Hivel integration.
   * Avoid using personal GitHub accounts to ensure only the intended repositories are accessed.

#### **Step 2: Access Developer Settings**

1. Click on the **Profile Icon** in the top-right corner of the GitHub dashboard.
2. Select **Settings** from the dropdown menu.
3. Scroll down and click on **Developer Settings** in the sidebar.

<img src="/files/z8oVu63kEdFmZRQgV18a" alt="" height="434" width="416">

<img src="/files/aNUSPAANdBdP4Z0mWRQ0" alt="" height="401" width="627">

#### **Step 3: Create a Personal Access Token**

1. In **Developer Settings**, navigate to **Personal Access Tokens**.
2. Choose **Tokens (classic)**.

<img src="/files/4il7IXSBMMxpZdKnrqG8" alt="" width="563">

#### **Step 4: Configure the Classic Token**

1. Click **Generate New Token** and select **Classic Token**.
2. Fill out the following details:
   * **Token Name:** Enter *Hivel* as the token name.
   * **Expiration Date:** Set it to **no expiration date**, or choose the **longest period your organization's policy allows.** (You can revoke this token manually when the engagement ends.)
3. Specify the scopes the token needs to operate effectively with Hivel:

   * **repo** (all)&#x20;

   <img src="/files/wbwW76gL5NPEkxVbeZH6" alt="" width="563">

   * **admin:org** (**read:org**)

   <img src="/files/WG8fpDgbad3RDcP4vuK4" alt="" width="563">

   * **User**\
     Select the following permissions:
     * **Read:user**
     * **User:email**

   <img src="/files/CMV6qArv8RQmQ8QC83Jk" alt="" width="563">
4. Once the configurations are complete, click Generate Token.

#### **Step 5: Authorize the Token for SAML SSO Organizations (if applicable)**

Additional step -only applies to organizations that have SAML SSO enabled; skip it otherwise.

1. If any of your organizations enforce SAML SSO, open the token under **Personal access tokens → Tokens (classic).**
2. Click **Configure SSO** next to the token, and **Authorize** it for each organization Hivel should access.

Without this, the token is valid but repositories in those organizations will not be visible to Hivel.

#### **Step 6: Connect in Hivel**

1. **Copy the generated token** immediately, as you won't be able to view it again.
2. **Submit** the token to Hivel.

Hivel validates the token instantly - if the token is wrong, expired, or missing any of the required scopes, Hivel shows a clear message telling you exactly what the problem is. Generate a new token with the correct scopes and reconnect.

That's it, all done!

\ <br>
