Importing Repos from Cloud Git Hosts

Updated 5 months ago by Jaala

Overview

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

We strongly recommend you use a service account to create this integration. Please see this help document 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. 

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 GitPrime Home page go to the left navigation bar. At the bottom go to then select 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. 

Connection options may vary based on Git host Integration.

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.

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 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 GitPrime 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 GitPrime 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 OAuth Integration.

Step 8: You can begin to import your repos by going to your repo import page. Click repo import page. To learn more about managing your new Integration settings, see Managing Integrations.

Want someone from our team to walk you through connecting your first repo to GitPrime? Email us at support@gitprime.com or click on the chat icon in the bottom right corner of your screen.


How did we do?