---
updatedAt: 2025-02-13T17:50:59.000Z
agentTools:
  projectIndex: https://docs.emergetools.com/llms.txt
---

# GitLab

Emerge supports PR comments on Gitlab hosted and self-hosted repositories.

## Create a GitLab account (optional)

We recommend creating a new account with access to your GitLab repo. This account will be shown in PR comments, you can name it something like "Emerge Bot".

## Get an access token

From your [GitLab profile](https://gitlab.com/-/user_settings/personal_access_tokens), create a new access token with the `api` scope. Copy this token for use in the next step.

![](https://files.readme.io/125c893-Screen_Shot_2021-04-13_at_7.26.03_PM.png "Screen Shot 2021-04-13 at 7.26.03 PM.png")

## Configure Emerge profile

From your [Emerge profile](https://www.emergetools.com/profile) select "Manage your GitLab connection" and enter the access token generated in the previous step. If you're using a self hosted GitLab enter the url of your self hosted instance.

![](https://files.readme.io/df3537c-Screen_Shot_2021-04-13_at_7.43.23_PM.png "Screen Shot 2021-04-13 at 7.43.23 PM.png")

## Specify project id on uploads

#### iOS

Using the [Fastlane integration](https://docs.emergetools.com/docs/fastlane), provide a `gitlab_project_id` param with each upload. This can be copied from your GitLab project homepage.

#### Android

Using the Gradle plugin, set the `vcs.gitlab.projectId` value in the `emerge` configuration block. The projectId can be copied from your GitLab project homepage.

```kotlin
emerge {
  // ..

  vcs {
    // ..

    gitLab {
      projectId.set("..")
    }
  }
}
```