Skip to main content

GitLab Configuration

IconPaid feature

The GitLab configuration for git sync offers a flexible way to connect your ToolJet workspace to a GitLab repository. This setup uses HTTPS instead of the traditional SSH-based method, eliminating the need to manage SSH keys and bypassing SSH port blocks. You can also select and switch repository branches directly within the ToolJet interface.

Role Required: Admin

1. Create a New Project​

Create a new project in your GitLab account. You can choose to make it public or private. If you’re using an existing repository, ensure it’s empty before proceeding.

2. Get the GitLab Project ID​

On the project overview page, click Actions in the upper-right corner and then select Copy project ID. This value represents the unique identifier assigned by GitLab to your project. Save this value for later use.

git sync

3. Generate a Personal Access Token​

Follow these steps to generate a personal access token:

  • Go to your Project Settings and click on Access Tokens
  • Enter name for your token.
  • Select a role as Developer, Maintainer, or Owner
  • Select the required scopes. The mandatory scopes are:
    • api
    • read_api
    • read_repository
    • write_repository
  • Click the Create personal access token button.

Once generated, copy and store the token as it won't be displayed again. This token will be used later when configuring git sync.

4. Configure GitLab in git sync​

Navigate to the Workspace settings page and click on the Configure git tab. Then, enter the required configuration values after selecting GitLab as your repository provider.

git sync

The table below describes each configuration values:

Repository​

SettingDescription
Repo URLThe URL of the Project you created to use with ToolJet. (e.g https://gitlab.com/<group-name>/<project-name> or https://gitlab.com/<username>/<project-name>)
Branch nameBranch name of your project. By default, it uses the main branch.

Self-hosted GitLab (Optional)​

SettingDescription
GitLab enterprise URLThe domain used to access your self-hosted GitLab instance. (e.g https://gitlab.corp.com) If you use GitLab Cloud, you can leave this blank.

Project Access Configuration​

SettingDescription
GitLab Project IDThe GitLab project ID.
GitLab Project access tokenThe GitLab project token.

Once you've entered the necessary configurations, click Save Changes. Your workspace will now be connected to your GitLab project.