Please review our guide Connecting to popular on-premise source control systems before connecting to Self-Managed/Dedicated GitLab. All team members will need to follow these steps to connect to their GitLab accounts.
Note: Your self-managed GitLab server must have a public DNS entry that points to a public IP address. This ensures Gearset can communicate with your GitLab instance.
You have two options to connect to GitLab either using OAuth using a GitLab Application or using an Access token.
Using a GitLab Application
You will need to create a new OAuth application for Gearset. To do this, navigate to Preferences in your GitLab instance.
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.
Ensure that Confidential option is ticked, then tick api, read_user, read_repository and write_repository scopes.
Click Save application.
Connect GitLab Self-Managed/Dedicated in Gearset
Go to Source control and services page in the Gearset app.
To add your new GitLab application to Gearset, click + Connect to GitLab Self Managed/Dedicated via OAuth.
Fill in the on-premise/dedicated GitLab URL (i.e. gitlab.kevin.com).
To find your GitLab URL:
Open GitLab in your web browser (on your device, computer or laptop).
Copy the address from your browser's address bar. In some browsers, you may need to 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 https://gitlab.com, you are using the cloud version of GitLab and Gearset will work with your GitLab account without having to generate an application in GitLab with the above steps. For steps on integrating with GitLab cloud, please see Integrating with GitLab.
Then fill in the Application ID and Secret as shown in GitLab.
To find these details in GitLab, go to User Settings > Preferences > Applications.
Click 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 (self-managed) as a source or target for comparisons and automated jobs. You can remove Gearset as an authorized app from GitLab at any time.
Access Token Connections
We support setting up GitLab connections using Group, Personal and Project Access Tokens that have been created in GitLab.
User connections are restricted to using
PersonalAccess Tokens. This is because we will perform VCS actions as the VCS user performing the action to keep an audit trail.
We recommend using
GrouporProjectAccess Tokens for Team connections, however you can also use aPersonalAccess Token here as well.
Personal Access tokens can be created in your GitLab User Settings -> Personal Access Tokens
Group and Project Access Tokens can normally only be created with increased privileges. Contact your Admin or Maintainer if these need to be created.
Access Tokens should be created with the same permission scope as OAuth connections. When creating the Token check the api scope.
To connect via Access Token click + Connect to GitLab Self Managed via Access Token this will bring up a modal where you can enter your GitLab Self-Managed/Dedicated Instance Url and Access Token you wish to use.
Access tokens are a direct link to your repository and therefore do not go through the same flow as OAuth.
Personal Access Tokens will act as the user that created them and will have the same access to the same Groups and Projects as this user.
Project and Group Access Tokens create a non-seat using bot user in the background when they are created in GitLab and will have a defined scope e.g.
GroupAccess Tokens will have access to allProjectsin aGroup.ProjectAccess Tokens will only have access to a singleProject











