> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revyl.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitLab

> Connect GitLab and run builds and device proof on merge requests.

GitLab connects through an automation token and a project webhook. GitLab.com
and publicly reachable self-managed HTTPS instances are supported when GitLab
is enabled for your Revyl organization.

## 1. Create an automation token

In GitLab, open your group's **Settings → Service accounts**. Create or select
a service account and grant it **Developer** access to the projects Revyl will
use. Create a personal access token with the **api** scope.

A group or project access token with Developer access and `api` scope also
works. Human-account tokens are not supported. Follow your GitLab policy for
expiration; account/token availability depends on your GitLab plan and version.

## 2. Connect from your terminal

```bash theme={null}
revyl auth login
revyl gitlab connect
```

Paste the token at the hidden prompt. Revyl validates and encrypts it; the CLI
does not store the GitLab token locally. A Revyl organization Owner or Admin
must connect it. To replace the token later, rerun `revyl gitlab connect`.

For a self-managed instance, use
`revyl gitlab connect --instance https://gitlab.example.com`.
The Git origin must match the connected instance. Private networks, custom
certificate authorities, and instance base paths are not supported.

## 3. Configure your project

From the mobile project directory:

```bash theme={null}
revyl init -y
revyl gitlab setup
```

`revyl init -y` creates the local project configuration. Configure GitLab
separately with `revyl gitlab setup`.

Setup selects Revyl-managed builds or uploads from your CI, binds apps, and
validates the project configuration. For an existing project, use
`revyl config pull` instead of creating a new config. In a monorepo, target one
project at a time with `revyl -C apps/mobile gitlab setup`.

See [project configuration](/cli/configuration) and
[CI builds](/builds/ci-builds) for build settings.

## 4. Install the webhook

Open the Revyl repository settings URL printed by setup and select **Webhook
setup**. A GitLab project Maintainer or Owner then:

1. Opens **Settings → Webhooks → Add new webhook** in GitLab.
2. Copies the **URL** and **Secret token** from Revyl.
3. Enables **Merge request events** and **Push events**, leaving SSL verification on.
4. Adds the webhook and sends a test **Push event**.

Return to the terminal to check delivery, or rerun `revyl gitlab setup`.
API access and authenticated webhook delivery are verified separately.

## 5. Verify

```bash theme={null}
revyl gitlab status
```

Check repository access, project configuration, and webhook verification, then
open a merge request. Revyl posts build and proof results to that MR.

For JSON status output and token input through stdin, see the
[CLI command reference](/cli/command-reference#gitlab-integration).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.