Importing repos from cloud Git hosts

Tags: Flow

Overview

Below is a step-by-step guide for adding your repos via OAuth. 

Important: We strongly recommend you use a service account to create this integration. Please see this article for instructions to create a service account and read more about why service accounts are important here.

Connect to your Git Host

OAuth is available for GitHub, Bitbucket, and GitLab — this is the fastest and easiest method to connect your repos and bring in all of your data including pull requests and tickets. 

Tip: You must be either the owner or a collaborator in the org, group, or project in your Git host in order to import repositories.

Step 1: Starting on your Flow home page, go to the top navigation bar and click Settings. Using the left navigation under Integrations, click Integrations.

Step 2: Select the Add Integration button in the top right hand corner of your integrations screen. 


Step 3: On the following page select the desired Git host from the Integration Provider list and click Next. In this example we are using GitHub. 


Step 3: In this next step you can choose one of three ways to connect your Git host. Choose the connection that works best for your organization.

Based on the host you select, connection options may vary.


A.) OAuth - This is the simplest way to connect to your Git host. Under the OAuth tab, click Connect to GitHub.


If you are already logged into your Git host you will automatically be connected and you will see the following message. If you are not logged in, you will be prompted to login and then you will be connected. 


B.) Username/Password - You can connect to your Git host using your Git host credentials under the Username/Password tab. Input your information and click Test connection.


If the connection was successful you will see the following message:


If the connection was unsuccessful the following message will appear. Double check your credentials and try again, or connect via OAuth.



Tip: At this time two factor authentication is not supported via username and password. If your account has two-factor authentication enabled you will need to use an access token as your password.

C.) Access Token - You can also connect via an access token. This option is available for GitHub and GitLab. On the Access Token tab input your access token and click Test connection.


You can create an access token in GitHub by navigating to your settings.


Under your Personal Settings, click Developer Settings.


Click Personal access tokens then click Generate new token.


Give your token a description, select your desired scopes for the token then click Generate token. See our recommended access token permissions below. 


Once you have created your token, copy it and paste it into your GitHub integration in Flow and click Test connection.


If the connection was successful you will see the following message:


Step 4: Once you have successfully connected to your Git host, click Next.


Step 5: On the next screen you will be selecting the services you want turned on for this integration. If you would like Flow to ingest ticket data and pull request data in addition to repo data, then leave all three services on. You can turn services “on” and “off” at any time. Click Next.


Step 6: Name your integration so you can identify the account you connected with. In this example we named it “Robert’s GitHub”. Click Create.


Step 7: You have successfully created a new integration via OAuth.



Step 8: 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 Managing integrations.


back to top


If you need help, please email support@pluralsight.com for 24/7 assistance.