GitLab Server — PAT

circle-exclamation

Overview

When Mobb connects to an on-premises GitLab Server through the Mobb Broker using Personal Access Token (PAT) authentication, it requires a valid GitLab access token to interact with the GitLab API. This guide explains how to generate a new token and update it in Mobb.

Prerequisites

  • Access to a Mobb on-premises deployment with the Mobb Broker configured for GitLab Server

  • Permission to create a Personal Access Token or Project Access Token in your GitLab Server instance

  • Admin or Owner access to the relevant Mobb organization

Steps

Step 1: Generate a New GitLab Access Token

You can use either a Personal Access Token or a Project Access Token.

Option A: Personal Access Token

  1. In GitLab Server, click your user icon in the top-right corner and select Edit profile.

  2. In the left sidebar, navigate to Access Tokens.

  3. Click Add new token.

GitLab Server Personal Access Tokens page
GitLab Server — Navigate to User Settings → Access Tokens and click Add new token
  1. Give the token a name and set an expiration date.

  2. Enable the following scopes:

    • api

    • read_user

    GitLab Personal Access Token scope selection
    Select the api and read_user scopes
  3. Click Create personal access token and copy the generated token value.

Option B: Project Access Token

  1. In GitLab Server, navigate to your project.

  2. Go to SettingsAccess Tokens.

  3. Click Add new token.

  4. Give the token a name and set an expiration date.

  5. Set the role to Developer or higher.

  6. Enable the following scope:

    • api

    GitLab Project Access Token settings
    Set the role to Developer and select the api scope
  7. Click Create project access token and copy the generated token value.

Step 2: Update the Access Token in Mobb

  1. In the Mobb interface, click the Integrations icon in the left sidebar.

  2. Locate GitLab Server under the "Hosted Code Platforms" section and click + Connect or Configure.

    Mobb Integrations page
    Locate GitLab Server and click Configure
  3. Select your GitLab Server URL from the list and click Continue.

    GitLab Server URL selection
    Select your GitLab Server URL
  4. In the next screen, enter your new GitLab Server access token (either Personal Access Token or Project Access Token) and complete the configuration.

    Enter GitLab access token
    Paste your GitLab access token and complete setup

Verification

After updating the access token, verify that Mobb can successfully connect to your GitLab Server:

  1. On the configuration screen, you should see a "Connected" status indicating successful authentication.

    GitLab Server connection successful
    GitLab Server shows as Connected
  2. You can also verify by returning to the Integrations page—the GitLab Server integration should display a Connected checkmark.

    Integrations page with GitLab Server connected
    Integrations page confirms GitLab Server is connected

Troubleshooting

If you see connection errors, verify that:

  • The access token has not expired

  • The token has the correct scopes (api and read_user)

  • Your GitLab Server is reachable from the Mobb Broker network

Verify Mobb Broker Connectivity

To verify that the Mobb Broker can reach your GitLab Server, you can use the Mobb REST API to check SCM connection statusarrow-up-right:

This endpoint will return the current connection status of your Mobb Broker to the SCM. If the broker cannot reach GitLab Server, reach out to us via [email protected].

Last updated