> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/ai-dlc-insights/3.0/use-ai-dlc-insights/setup/integrations/gitlab/index.md).

# Connect with GitLab Cloud

GitLab is a DevOps platform that provides Git repos, CI/CD pipelines, issue management, and more.

To integrate Harness SEI with GitLab, you must choose your GitLab Account type. Harness SEI supports connecting with the following:

* GitLab Cloud
* GitLab Private Cloud
* GitLab Enterprise

To integrate with GitLab Enterprise, go to [Connect with GitLab Enterprise](/software-engineering-insights/use-software-engineering-insights/setup-sei/configure-integrations/gitlab/sei-integration-gitlab.md).

#### Configure authentication <a href="#configure-authentication" id="configure-authentication"></a>

The SEI GitLab integration can use either OAuth or personal access token authentication. For OAuth, your account must have the **Reporter** role or higher.

If you can't use OAuth, you must create a GitLab personal access token to configure the SEI GitLab integration.

1. Log in to your GitLab account and create a personal access token. For instructions, go to the GitLab documentation on [Personal Access Tokens](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html).
2. Select the `api` scope with read API access.
3. Copy the token somewhere that you can retrieve it when you configure the integration.

{% hint style="info" %}
If you have enabled an allowlist in your GitLab account, certain Harness IP addresses must be added to it in order to allow communication between the Harness Platform and GitLab. If the necessary IPs are not whitelisted, the integration may fail to authenticate or sync data properly.

To ensure your integration can work correctly, refer to the list of [Harness Platform IPs](/harness-ai/use-harness-platform/references/allowlist-harness-domains-and-ips.md) that may need to be whitelisted in your firewall.
{% endhint %}

#### Add the integration <a href="#add-the-integration" id="add-the-integration"></a>

1. In your **Harness Project**, go to the **SEI Module**, and select **Account**.
2. Select **Integrations** under **Data Settings**.
3. Select **Available Integrations**, locate the **GitLab** integration, and select **Install**.
4. Choose the type of **Gitlab Account** as **Cloud**.

{% tabs %}
{% tab title="Using OAuth" %}

* Select the authentication medium as **Using OAuth**
* You’ll be redirected to GitLab, where you can grant permissions for the integration. GitLab will confirm authorization, returning you to the integration setup page.
* In **Integration Name**, enter a name for the integration.
* Click **Validate Connection** to run preliminary checks, ensuring the OAuth connection is functional. During this step, any access issues or authorization errors will be highlighted. Once validated successfully, the integration will appear under **Your Integrations**, where you can monitor its status and connectivity.
  {% endtab %}

{% tab title="Using Personal Access Token" %}
This authentication method is simple to set up and is suitable for various API interactions. However note that tokens expire based on their assigned lifespan, requiring periodic renewal to keep the integration active.

* Select the authentication medium as **Using Personal Access Token (PAT)**.
* In **Integration Name**, enter a name for the integration.
* Paste the previously generated Personal Access Token.
* Click **Validate Connection** to run the pre-flight checks. This step verifies the token's validity and permissions to ensure the integration can connect and retrieve data. If all checks pass, the integration will appear under Your Integrations, confirming successful setup.
  {% endtab %}
  {% endtabs %}

#### See also <a href="#see-also" id="see-also"></a>

* [Connect with GitLab Private Cloud](/software-engineering-insights/use-software-engineering-insights/setup-sei/configure-integrations/gitlab/sei-gitlab-private-cloud.md)
* [Connect with GitLab On-Prem](/software-engineering-insights/use-software-engineering-insights/setup-sei/configure-integrations/gitlab/sei-gitlab-onprem.md)
* [Reauthenticate](/software-engineering-insights/use-software-engineering-insights/setup-sei/configure-integrations/reauthenticate-integration.md)
* [Recommendations](/software-engineering-insights/use-software-engineering-insights/setup-sei/configure-integrations/gitlab/sei-gitlab-recommendations.md)
