# Gitlab Server

**Data Access by Hivel**

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

**Authorization Mechanism**

* Hivel employs GitLab Server's OAuth for authentication.
* Users maintain full control and can withdraw access by revoking the Personal Access Token.

**Effortlessly Connect Your GitLab Server with Hivel**

This easy-to-follow guide will lead you through each step, ensuring a smooth and efficient integration process to unlock efficiency insights across your org.&#x20;

**Step 1: Gather Your GitLab Server Details**

First things first, let's get some essential information from your GitLab Server:

* **GitLab Server URL**: This is your gateway to accessing your GitLab Server. Look for an address in the format of `https://{your-git-domain}.com/`. Don't forget to replace `{your-git-domain}` with your actual domain.
* **GitLab Server Version**: Compatibility is key, and knowing your GitLab Server version is crucial. Here's how to find it:
  * Head over to your GitLab Server interface.
  * Click on the 'Help' section. It’s usually at the end of your GitLab URL, like this: `/help`.
  * You'll see your version info displayed, typically in the format of "GitLab Community Edition {x.x.x} / GitLab Enterprise Edition {x.x.x}".

**Step 2: Whitelist Necessary IP Addresses**

For a secure and uninterrupted connection, make sure to whitelist the following IP addresses:

* **Mandatory IPs**:
  * 107.23.139.76
  * 3.219.89.23
* **Recommended but Optional IPs**:
  * 45.119.114.218
  * 183.82.116.218

**Step 3: Creating a Personal Access Token (PAT):**

Let's create your PAT in GitLab:

* Select 'Preferences'.

<figure><img src="/files/87NSlAXtVLYvJTs5TUYU" alt="" width="225"><figcaption></figcaption></figure>

* Navigate to 'Access Tokens' in the left sidebar.

<figure><img src="/files/DjYeG8wuuLOG4YjKMLNs" alt="" width="122"><figcaption></figcaption></figure>

* Enter a token name and opt not to set an expiry date.

<figure><img src="/files/FrQvQfNr9bkI0D5dikQH" alt="" width="375"><figcaption></figcaption></figure>

* Select the following scopes: `api, read_api, read_user, read_repository`.

<figure><img src="/files/sob0zZlBWjh15W33aBkX" alt="" width="375"><figcaption></figcaption></figure>

* Click 'Create personal access token'. **Note these scopes as they're crucial for integration**

**Step 4:** Navigate to the Hivel [<mark style="color:purple;">sign-up page</mark>](https://app.hivel.ai/signup)<br>

**Step 5:** Add your work email id (If you'd like to use your personal email id please contact [<mark style="color:purple;">support@hivel.ai</mark>)](mailto:support@hivel.ai\))<br>

**Step 6:** Now, you can use your Google or Microsoft login with your work email id; or create a password.

**Step 7:** Create your Company Profile, and click '**Get Started**'.

**Step 8:** Once you've successfully created your Company Profile, you will be redirected to the Integrations Page.

**Step 9:** Select Gitlab and log in to your company's Gitlab account using a service account.

**Step 10: Share Your Details**

You’ll need to provide the following:

* Email, preferably a service account such as \[<tech_services@domain.com>]
* Username
* Personal Access Token (PAT) - return to the Hivel application, paste the personal access token, and hit **Submit.**

**Below are some screenshots of the steps you can refer to if needed:**

<figure><img src="/files/Fw0xoTnojx7GlwFPSlFb" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="/files/IWo7f4kTNZvdEneoGZBR" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="/files/4VP0yWh7QZtvqbNJl1V4" alt="" width="375"><figcaption></figcaption></figure>


---

# 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/scm/gitlab/gitlab-server.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.
