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

# GitLab Cloud - Classic Token (recommended)

How do I sign-up with GitLab Cloud?

To connect GitLab Cloud to Hivel using a Personal Access Token (PAT), follow these steps:

**Data Access by Hivel**

* Hivel accesses the past **30-90 days** of commits and pull requests from active repositories during the initial sync.

**Authorization Mechanism**

* Hivel integrates with GitLab Cloud using a **Personal Access Token**.
* You retain full control - access can be revoked at any time by revoking the token in GitLab under **Preferences → Access Tokens**.

**Requirements**

* Ensure the token is created from an account possessing write permissions to relevant GitLab repositories.

**Best Practice**

* Opt for a service account rather than an individual-linked account.
* Service accounts are typically overseen by the company's admin.

**Quick start:** skip the navigation - [open the token creation page](https://gitlab.com/-/user_settings/personal_access_tokens), then continue from Step 3. 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 GitLab service account:**
   * Use a dedicated service account that has access to the required repositories for Hivel integration.
   * Avoid using personal GitLab accounts to ensure only the intended repositories are accessed.

#### **Step 2: Open Access Tokens**

1. In your GitLab account, click your **avatar** in the top-right corner.
2. Select **Preferences**.

   <img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FaRG2gWTy2XxZZuajF5ev%2Funknown.png?alt=media&amp;token=bfdb360a-f12f-42d7-910f-a15e806b8cb7" alt="" height="391" width="277">
3. On the left sidebar, select **Access > Personal access tokens**.<br>

   ![](https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FMLPNIdIyHVLq8AMXx1rl%2Funknown.png?alt=media\&token=f118b7a6-0f55-457e-900e-485d388ea2af)

#### **Step 3:**

Click on the **Generate token** dropdown and select **Legacy token**.

![](https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2Fa3F6vr9HZaelQtvYcNxM%2Funknown.png?alt=media\&token=9c6936e4-0fdd-4717-80ca-bb2040e5b17f)

#### **Step 4: Configure the Personal Access Token**

1. Enter a name (e.g. *Hivel*), and set the **longest expiry date your organization's policy allows**. (GitLab requires an expiry date on personal access tokens. You can revoke the token manually when the engagement ends.)
2. Select the desired scopes:

   1. *read\_api*
   2. *read\_user*
   3. *read\_repository*

   ![](https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FITeViUlI0YHbMjOnmoMx%2Funknown.png?alt=media\&token=81c92d11-00e2-48f1-b68b-cf45cee0ccc7)
3. Select **Create personal access token**, and **copy it** immediately, as you won't be able to view it again.

#### **Step 5: 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>
