Connect your Gitlab repository

To connect your GitLab to Y42, you will need to follow these steps:

  1. Create a new GitLab repository
  2. Create an access token for the project
  3. Authorize Y42 with the repository

Create a new GitLab repository

We recommend creating a new GitLab repository every time you set up a new space with Y42. This prevents errors in the set-up process.

If you have an existing dbt project, you can use it directly. However, it will need to meet the standard dbt project structure in order to be correctly read by Y42. Learn more → (opens in a new tab)

Create a new repo based on the Y42 template repository.Create a new repo based on the Y42 template repository.

Generate an access token for Y42

Once your GitLab project is created, you need to generate an access token. Project Access Tokens are the most straightforward way to allow access to a repository. They are similar to passwords, except you can limit access to resources, select a limited role, and provide an expiry date.

Creating a project access token

  1. On the left sidebar in GitLab, select Search or go to and find your project.

  2. Select Settings > Access Tokens

  3. Select Add new token

  4. Enter a name. The token name is visible to any user with permissions to view the project.

  5. Enter an expiry date for the token

  6. Select the Owner role

  7. For the scopes, we require the following ones to be selected for your space to work correctly:

    • api
    • read_api
    • create_runner
    • read_repository
    • write_repository
  8. Select Create project access token

Create project access token.Create project access token.

Authorize Y42 with the repository

In the Y42 app, click on “Authorize repositories in GitLab”.

Authorize repositories in GitLab.Authorize repositories in GitLab.

You will be prompted with an input field where you should enter the access token generated in the previous step.

Enter the generated access token.Enter the generated access token.

You will then be prompted to confirm that you want to link the repository to your space. If multiple GitLab projects are linked to the access token, then you will need to choose one from the list.

Select repository you want to link.Select repository you want to link.

Afterwards, you will receive a confirmation that the space has been successfully linked.

Confirmation that the space has been successfully linked.Confirmation that the space has been successfully linked.

Your GitLab repository is ready to be used with the Y42 space.

FAQ

What happens if my access token expires?
Can I change my linked repository later?