This is a step-by-step guide on how to connect your self-hosted GitLab account to Flow. If your repositories are behind a firewall, allowlist our IPs on port 443 over HTTPS. You also need a public DNS record pointing to the IP address to be exposed for Flow analysis. This DNS entry should match the TLS/SSL certificate the server is utilizing.
Important: Use a service account to create this integration. Learn more about creating a service account.
In this article
Permissions requirements
To use repos, PRs, tickets, and Webhooks when integrating with Flow, the service account must be a maintainer or owner at the project and repository level. If you prefer not to enable Webhooks, the minimum permission needed in GitLab is reporter at the project and repository level.
Version requirement
This integration requires GitLab 9.0 or higher.
GitLab Enterprise configuration
In order to connect your GitLab Enterprise, first create a new integration.
- In Flow, go to the top navigation bar and click Settings.
- Using the left navigation under Integrations, click Integrations.
- Click Add Integration in the top right hand corner of the integrations page.
- On the following page select GitLab Self-Hosted from the Integration Provider list and click Next.
Choose to connect via an OAuth application or access token.
OAuth
On any page of your GitLab instance, click your user icon and then navigate to Settings and Applications. Fill in the following information under Add new application:
- Name: Flow
- Redirect URL: https://flow.pluralsight.com/accounts/complete/gitlab-enterprise
-
Scopes:
api
,read_user
Then fill in your Application ID, Client Secret, and Base URL from GitLab into the Flow integration screen.
Tip: Before proceeding to the next step, make sure you have pop-up blockers disabled on your browser. The following steps include a pop-up that finalizes your connection to your GitLab account. If you have pop-ups blocked, you'll have to start over.
Click Connect to GitLab Self-Hosted. If Flow is able to successfully access your instance, you'll see a success message.
If your connection is not successful, verify your Client ID and Secret, Base URL, and the callback URL you provided when creating the OAuth application in GitLab.
Access token
You can also connect via an access token. On the access token tab, input your Personal Access Token and Base URL. For more information on where to create an access token in GitLab, see GitLab’s support document Personal access tokens (external site, opens in new tab).
The minimum scopes needed for your access token are:
api
read_user
read_repository
Once you've inputted your access token and other information in Flow, click Test connection.
If the connection was successful, you'll receive a success message.
If you receive an error, verify the access token and base URL and try again.
Once you've successfully connected to your GitLab account, click Next.
Customize your integration
Next, select the services you want turned on for this Integration. If you want to import ticket and pull request data in addition to repo data, leave all services on. You can turn services on and off at any time. Click Next.
Name your integration so you can identify the account you connected with. Click Create.
You can begin to import your repos by going to your repo import page. Click the repo import page link. To learn more about managing your new integration settings, see Manage integrations.