Skip to main content

Self-Hosted GitLab Integration

Use this guide when your organization runs its own GitLab instance, such as https://gitlab.yourcompany.com. If you do not have a GitMe account yet, start from GitMe Signup. If you already have an account, continue from GitMe Signin.

Add more integrations anytime

You can connect more than one Git integration in GitMe. Your workspace can include multiple providers at the same time, including cloud and self-hosted integrations.

If you need to connect additional self-hosted GitLab instances later, repeat this flow for each instance with the appropriate authorized admin.

Step 1 - Register a New OAuth Application in GitLab

Required: You must have administrator access to your GitLab server.

  1. Log in to your GitLab instance as an administrator.
  2. Go to your user profile and select Edit Profile.
  3. From the left sidebar, choose Applications under Access.
  4. Under New Application, fill in the form:
    • Name: GitMe Performance Tracking

    • Redirect URI:

      https://backend.gitdotme.com/self-hosted-integrations/gitlab/callback
    • Scopes:

      • read_repository
      • read_user
      • read_api
    • Confidential: Checked

  5. Click Create application.
  6. Copy the Application ID and Secret. You will need them in GitMe.
warning

The Redirect URI must match exactly. If GitLab returns The redirect URI included is not valid, check that the value in GitLab is exactly:

https://backend.gitdotme.com/self-hosted-integrations/gitlab/callback

Step 2 - Open the Self Hosted Integration Card

  1. Open GitMe.
  2. Go to Account Settings > Integrations.
  3. Select the Self Hosted tab.
  4. Find Self-Hosted GitLab.
  5. Use View Setup Guide if you need to return to this page.
  6. Click Connect.

Self Hosted integration cards

GitMe will ask you to confirm that you already created the OAuth application on your Git server. Check the confirmation box, then continue.

If another authorized admin needs to complete setup, send the invite from Settings > Invite User and assign the Account Admin role first.

Step 3 - Enter Your GitLab OAuth Credentials

On the GitMe connection screen, enter:

  • Instance URL: Your GitLab base URL, for example https://gitlab.yourcompany.com
  • Application ID: The Application ID from GitLab
  • Secret: The Secret from GitLab

Click Connect.

Self-Hosted GitLab credential screen

GitMe stores the OAuth client secret and OAuth tokens securely.

Step 4 - Authorize GitMe in GitLab

After clicking Connect, GitMe redirects you to your GitLab authorization page.

  1. Review the requested permissions.
  2. Click Authorize.

GitLab request access

Step 5 - Finish Configuration in GitMe

After successful authorization, GitLab redirects you back to GitMe. GitMe creates the self-hosted GitLab connection and sends you to:

/settings/plan-configuration?integration=connected

You can also open the page directly from Settings > Plan Configuration.

Choose or confirm your plan configuration. GitMe will use the authorized GitLab access to discover repositories that the connected GitLab user can read.

After plan selection, complete billing setup from Settings > Billing & Payment.

warning

Network Access Requirements

To successfully integrate self-hosted GitLab with GitMe, the following network requirements must be met:

  • Your GitLab instance must be reachable by GitMe cloud services over HTTPS.
    • For example: https://gitlab.yourcompany.com
  • GitMe cloud services must be able to access your GitLab OAuth and API endpoints over the internet.
    • OAuth token endpoint: https://gitlab.yourcompany.com/oauth/token
    • API endpoint example: https://gitlab.yourcompany.com/api/v4/
  • Your GitLab OAuth application must use the following callback URL:
    • https://backend.gitdotme.com/self-hosted-integrations/gitlab/callback
  • The admin completing the setup must be able to access both GitMe and your GitLab instance from their browser.
  • If your GitLab instance is not accessible to GitMe cloud services over HTTPS, the integration cannot be completed.

You're All Set

Your self-hosted GitLab integration setup is complete. GitMe can now start syncing the repositories available through the authorized connection so you can continue with your workspace setup and begin using GitMe analytics.

Need older data too?

GitMe standardly starts analysis from the beginning of the month in which your workspace was set up. If you need older commit history to be analyzed as well, see the Historical Analysis documentation.