Skip to main content
Integrating with self-managed GitLab

Deploy to and from your own GitLab instance

Gwilym Inzani avatar
Written by Gwilym Inzani
Updated over 3 months ago

Please see this guide about on-premise connections first before connecting to self-managed GitLab:
​Connecting to popular on-premise source control systems

If your team is using self-managed GitLab, all team members will need to follow these steps to connect to their GitLab accounts.

Important to note: When integrating with a self-managed GitLab server, the server must have a public DNS entry that points to a public IP address. This ensures that Gearset can communicate with your GitLab instance.

Create an application

You will need to create a new OAuth application for Gearset. To do this, navigate to Preferences in your GitLab instance.
​

Navigate to Preferences

In the Applications section create a new application.

Fill in Gearset as the name, and https://app.gearset.com/authorization/gitlab-self-managed/callback as the redirect URI.

Navigate to Applications

Ensure that Confidential option is ticked (screenshot below), and then tick the api, read_user, read_repository and write_repository scopes:

Click on Save application:

Connect GitLab self managed in Gearset

Go to Source control and services page in the Gearset app.

To add your new GitLab application to Gearset, click on the + Connect to GitLab Selfm Managed button.

Fill in the on-premise GitLab URL in URL (i.e. gitlab.kevin.com). To find your GitLab URL:

  1. Open GitLab in your web browser (on your device, computer or laptop).

  2. Copy the address from your browser's address bar. In some browsers you may need to tap or click the address bar to see the full URL. If you're viewing the dashboard, the GitLab URL is everything that comes before /dashboard.

If your URL is gitlab.com, then you're using the cloud version of GitLab and Gearset will work perfectly with your GitLab product without having to generate an application in GitLab with the above steps. For steps on integrating with GitLab cloud, refer to this article: Integrating with GitLab.

Then fill in the Application ID and Secret as shown in GitLab.
​
To find these details in your GitLab, go to User Settings > Preferences > Applications.

After clicking Connect, you will be redirected to GitLab where you can log in normally and accept the requested permissions.

After authorizing Gearset, you should now be able to use GitLab as a source or target for comparisons and automated jobs.

Did this answer your question?