Connect with GitLab Cloud
GitLab is a DevOps platform that provides Git repos, CI/CD pipelines, issue management, and more.
To integrate SEI with Gitlab, you must choose your Gitlab Account type. SEI supports connecting with the following:
- Gitlab Cloud
- Gitlab Private Cloud
- Gitlab Enterprise
To integrate with Gitlab Enterprise, go to Connect with Gitlab Enterprise.
Configure authentication
The SEI GitLab integration can use either OAuth or personal access token authentication.
For OAuth, your account must have the Reporter role or higher.
If you can't use OAuth, you must create a GitLab personal access token to configure the SEI GitLab integration.
- Log in to your GitLab account and create a personal access token. For instructions, go to the GitLab documentation on Personal Access Tokens.
- Select the
api
scope with complete read/write API access. - Copy the token somewhere that you can retrieve it when you configure the integration.
If you have enabled an allow list in your GitLab account, certain Harness IP addresses must be added to it in order to allow communication between the Harness Platform and GitLab. If the necessary IPs are not whitelisted, the integration may fail to authenticate or sync data properly.
To ensure your integration can work correctly, please refer to the list of Harness Platform IPs that may need to be whitelisted in your firewall.
Add the integration
- In your Harness Project, go to the SEI Module, and select Account.
- Select Integrations under Data Settings.
- Select Available Integrations, locate the GitLab integration, and select Install.
- Choose the type of Gitlab Account as Cloud.
- Using OAuth
- Using Personal Access Token
- Select the authentication medium as Using OAuth
- You’ll be redirected to GitLab, where you can grant permissions for the integration. GitLab will confirm authorization, returning you to the integration setup page.
- In Integration Name, enter a name for the integration.
- Click Validate Connection to run preliminary checks, ensuring the OAuth connection is functional. During this step, any access issues or authorization errors will be highlighted. Once validated successfully, the integration will appear under Your Integrations, where you can monitor its status and connectivity.
This authentication method is simple to set up and is suitable for various API interactions. However note that tokens expire based on their assigned lifespan, requiring periodic renewal to keep the integration active.
- Select the authentication medium as Using Personal Access Token (PAT).
- In Integration Name, enter a name for the integration.
- Paste the previously generated Personal Access Token.
- Click Validate Connection to run the pre-flight checks. This step verifies the token's validity and permissions to ensure the integration can connect and retrieve data. If all checks pass, the integration will appear under Your Integrations, confirming successful setup.