# Gitlab Cloud

**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's OAuth for authentication.
* Users maintain full control and can withdraw access anytime via GitLab's authorized apps section.

**Requirements**

* Ensure to log in with an account possessing write permissions to relevant GitLab repositories.
* Write permissions are mandatory for webhook publication, facilitating real-time data sync.

**Best Practice**

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

**Create your Hivel Account**

1. Navigate to the Hivel [<mark style="color:purple;">sign-up page</mark>](https://app.hivel.ai/signup)
2. Add your work email id.
3. Now, you can use your Google or Microsoft login with your work email id; or create a password.
4. Create your Company Profile, and click '**Get Started**'.
5. Once you've successfully created your Company Profile, you will be redirected to the Integrations Page.
6. Select GitLab, and log in to your company's GitLab account using a service account.

**Connect GitLab**

1. Next, you will be redirected to Hivel and prompted to add a **Personal Access Token.**
2. To create a Personal Access Token, return to your GitLab account, and in the top-right corner, click your avatar.
3. Select **Preferences**
4. On the left sidebar, select **Access Tokens**.
5. Enter a name, and do not set any expiry date for the token.
6. Select the [<mark style="color:purple;">desired scopes</mark>](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#personal-access-token-scopes) - api, read\_api, read\_user, read\_repository
7. Select **Create personal access token**, and copy it.
8. Return to the Hivel application, paste the personal access token, and hit **Submit**.

Once the token is validated, and your GitLab is successfully integrated, we will start to pull data. It will take between 2 - 48 hours for the complete sync, depending on the volume of the data.<br>

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

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

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