---
description: This guide will take you through the GitLab integration.
---

# GitLab

> Setting up the GitLab integrations requires **Admin** privileges. Confirm that you have the correct permissions before continuing.

This guide will take you through the required steps to set up Datafold with GitLab. Let's start by adding a new Git config.

![](https://987627956-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW5oouougFyPvHgESLi%2F-MgiitoQDbCy9BMhBUSH%2F-MgijB9e047wmMHoSpSf%2Fimage.png?alt=media\&token=0ac3a1c2-9d88-4166-94ec-daf35191dc6c)

The integration name is a reference to the repository.

![](https://987627956-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MW5oouougFyPvHgESLi%2Fuploads%2FwjWHHupqoU0CnhS0YNRJ%2Fimage.png?alt=media\&token=574f90f9-37d6-4a02-8a9a-6a069419408e)

As the token we both support [project access token](https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html) and personal token. Project access tokens are preferred since they will stay active if the person leaves the Gitlab organization:

![](https://987627956-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MW5oouougFyPvHgESLi%2Fuploads%2FduLl2D5kY5EzeiHpTyck%2Fimage.png?alt=media\&token=5fcfb5f8-1132-4832-9074-e78e3e8f477b)

Datafold requires the Maintainer role.

For the personal access token; you can fetch the access token from [your profile page in GitLab](https://gitlab.com/-/profile/personal_access_tokens). For the integration the `api` permissions are sufficient.

![](https://987627956-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW5oouougFyPvHgESLi%2F-MjeX4hvV6uvoN9P0ApD%2F-MjeX9deGYwWBwFPAfSH%2Fimage.png?alt=media\&token=bee0bf5b-5932-4fe6-9b4d-99eb25f2e55c)

Let's use our example repository [datafold/dbt-snowflake](https://gitlab.com/datafold/dbt-snowflake) in GitLab. As the name suggests, this is a simple example setup using dbt with a Snowflake backend.

![](https://987627956-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW5oouougFyPvHgESLi%2F-MjeX4hvV6uvoN9P0ApD%2F-MjeXWh1jL4Ni8PfLWDX%2Fimage.png?alt=media\&token=2987bd88-e632-48a7-ab64-0816a85c8833)

After saving, it is always a good idea to hit the **Test** button to check if everything is set up correctly:

![](https://987627956-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW5oouougFyPvHgESLi%2F-MgjBeW2ne_pNU9rbe4k%2F-Mgj_cKfJJ2s3rd4juB4%2Fimage.png?alt=media\&token=13f00bb5-9565-4fbb-80fe-1858ab7c8c74)

After this, make sure to set up a CI under the CI settings.
