# Gitlab On-Prem

To integrate **Hivel** with **GitLab**, you'll need to create a **Personal Access Token (PAT)** for authentication. Below are the detailed steps to generate the token in GitLab:

***

#### **Steps to Create a Personal Access Token (PAT) in GitLab**

**1. Access User Settings**

* **Log in** to your **GitLab** account.
* In the top-right corner of the screen, click on your **profile icon**.
* From the dropdown menu, select **"Preferences"** to access your account settings.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXemfL102epMWT8llITWbQhS7GSrDkt6cRkiF6IDUrgTgdQroCSuYYtGQ4a62KUe_ir_6iP_-iZOzGxKyLg3MOB7BW4KVSQpu3c7n5i99DCus3lNqRbNldbHZZTWYBgIAQJ6hskMEw?key=3hJ1ramI-10wlNgIdI5NQFuy" alt="" width="188"><figcaption></figcaption></figure>

**2. Navigate to Access Tokens**

* In the left sidebar, scroll down and find **"Access tokens"** under the **"Access"** section.
* Click on **"Access tokens"** to open the token generation page.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdU8E_ZlES5KHJLx3jp8ATP9ZALqMXbEyFa14NdblRl2wrs2tAb73x0kV6LuoKSa0lI0JPvgDN2WYcvao6l2u1sJGwUgBEzaS5HZsurgs3uab9Lh_qTYgYaosFAVRZ3-_7PlaUtIw?key=3hJ1ramI-10wlNgIdI5NQFuy" alt="" width="188"><figcaption></figcaption></figure>

**3. Enter Token Details**

* **Name**: Enter a name for your token. It is recommended to use something descriptive, like **"Hivel"**, for easy identification.
* **Description**: This is optional, but you can add a description to help identify the token's purpose.
* **Expiration Date**: Set an expiration date for the token if desired, or leave it blank for **no expiration**.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcEdDs0conc10Qj52nF6J9eS0kUtvCGHWhnH6VWtdMJpW9NtmXLUAqrLW1o-KG03bVOOYl41X4_Lmaj_daxQD4L9r0L-0DsIIDWxbyhLSVxnfZyhN7rfp-SqC2IKbgAdAu08TN17w?key=3hJ1ramI-10wlNgIdI5NQFuy" alt=""><figcaption></figcaption></figure>

**4. Select Required Scopes**

* To enable **Hivel** to interact with your GitLab instance, check the following required scopes:
  * **read\_api**: To read data from the GitLab API.
  * **read\_user**: To read user information.
  * **read\_repository**: To access repository data.

**5. Create the Token**

* After entering the details and selecting the necessary scopes, click on the **"Create personal access token"** button.

**6. Save the Token**

* Once the token is created, **copy the generated token** immediately and store it in a secure location.
* **IMPORTANT**: This is the **only time** the token will be displayed, so make sure to copy it before leaving the page.

Use the token to complete the next steps as shown on the Integration screen in Hivel.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hivel.ai/integrations/on-prem-setup/gitlab-on-prem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
