Skip to content

Gitlab integration

This page describes how to configure Gaia to integrate with Gitlab to:

  • be able to login using a Gitlab account
  • be able to import Terraform modules directly from Gitlab


only public repositories of the Gitlab user can be imported for now.

Create a Gitlab OAuth App

On Github, create a new Gitlab App (in an organization or in your personnal account).

Go to

Screenshot of Applications screen on Gitlab

Enter the following information:

  • Application name : Gaia
  • Redirect URI : The URL of your Gaia instance + /auth/oauth2/gitlab/callback

Select the following scopes:

  • api
  • read_user
  • read_api
  • read_repository
  • openid
  • profile
  • email

And save.

Take note of the Application ID and of the Secret.

Screenshot the App showing Application ID and Secret on Gitlab

Configure Gaia for Gitlab

With docker-compose

Edit your docker-compose.yml file to activate the gitlab Spring profile, and to add your Application ID and Secret for the Gitlab registration :

version: "3"
    image: gaiaapp/gaia
      - '8080:8080'
      - "GAIA_MONGODB_URI=mongodb://mongo/gaia"

Login with Gitlab

On the Login page, the gitlab button should appear:

Screenshot the login page on Gaia

Import a module from Github

On the Import Module page, you should now be able to select a module from the repositories of your Github user.

Screenshot the login page on Gaia