> 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-cloud/github-cloud-classic-token-recommended.md).

# GitHub Cloud - Classic Token (recommended)

How to integrate GitHub with Classic Token?

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.<br>

   <img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FyXfCt06tHAT9PjFU3Eho%2Funknown.png?alt=media&amp;token=a52c5ce6-4756-4a24-a40d-b0b66bf3068c" alt="" width="563">
3. Scroll down and click on **Developer Settings** in the sidebar.

<img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FT85BZkkMP9YMF7vKKzdi%2Funknown.png?alt=media&amp;token=931915aa-ade6-40ca-8560-349ced5baf30" 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="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2F4jhsHU1UmTbbZhl8FqLN%2Funknown.png?alt=media&amp;token=e924efd3-0a8f-4e9e-8f16-4d79db4d1930" 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="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2Fzvpg903B59ywEG3XbwfG%2Funknown.png?alt=media&amp;token=b738cb55-b26b-4aca-924c-2c863017f99f" alt="" width="563">

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

   <img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2F24DSJe2RtZe2GL7tfbHa%2Funknown.png?alt=media&amp;token=a006a443-8c78-43d2-992c-80b850550f04" alt="" width="563">

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

   <img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2F4XUnGQjNLmTzA6GWibsd%2Funknown.png?alt=media&amp;token=52aa3e62-c435-4cfe-8467-f681423934c0" 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>
