Git Provider Integration

Introduction

Connecting projects to your code repository allows users to easily interact with branches and files from inside the Platform.

Supported Providers

  • GitHub.com
  • GitHub Enterprise 2.9+
  • Bitbucket.org
  • GitLab.com
  • GitLab Enterprise 7+

GitHub OAuth Integration

Connecting the DataScience.com Platform to your GitHub repositories first requires an authentication integration. The following steps show how to create a GitHub app and connect it to the DataScience.com Platform.

Create a GitHub OAuth Application

  1. In the Settings tab of your GitHub organization, select OAuth Applications from the menu on the left.
  2. Click the Register a new application button at the top right.
  3. Fill out the form with the hostname that you used when you installed the Platform. The callback will be the same hostname, with the path /oauth. When you are finished, click Register application.
  4. After you click Register application, make a note of the Client ID and Client Secret, as you will need these later in the integration process.

If you’d like to include an image for the GitHub Oauth Application, you may use this image.

Connect to Your GitHub OAuth Application

  1. Inside the DataScience.com Platform, navigate to Administration in the top menu bar.

  2. On the Admininistration screen, click the Git Providers tab.

  3. Click Connect to a Git Provider. You will be prompted with the option to add GitHub.com or GitHub Enterprise. Provide the Client ID and Client Secret you obtained when creating the OAuth application.

    GitHub Entreprise

Note

When integrating with GitHub Enterprise, you will also be prompted for the URL and the API URL. The URL will be the GitHub Enterprise instance you’re connecting to, and the API URL will be the same URL appended with /api/v3. Example: URL: http://github.datascience.com API URL: http://github.datascience.com/api/v3

GitHub URL

Warning

Do not append your organization name to the GitHub URLs in this section.
  1. To connect your Platform account to GitHub, first navigate to your account’s Settings page using the drop-down menu in the upper right-hand corner.
  2. Click the Git Integrations tab, then click Add Authentication.
  3. In the pop-up that appears, start typing the name of the Git provider you want to grant permissions to, then select it.
  4. Click Connect, and you will be taken to GitHub for authorization. Click Authorize application to continue and you will be redirected back to the DataScience.com Platform.

Bitbucket Integration

The Bitbucket integration uses Bitbucket’s App Passwords feature to grant the DataScience.com Platform access to your repositories. A Bitbucket App Password is just like your account password, but meant for other apps to control Bitbucket on your behalf.

Each user must bring their own Bitbucket App Password over to the DataScience.com Platform.

To enable the Bitbucket integration, visit Settings > Git Providers, select your Bitbucket type from the list of provider options, and fill in the details about your Bitbucket account.

GitLab Integration

How users authenticate with GitLab depends on the version of GitLab they’ll be connecting to. GitLab 7 and 8 use passwords for authentication, while GitLab 9 and GitLab.com use access tokens.

Each user must bring their own GitLab access token over to the DataScience.com Platform. For end-user documentation on how to register a GitLab access token, see the Git Configuration section of our user documentation.

To enable the GitLab integration as an administrator, visit Settings > Git Providers. Select GitLab from the list of provider options, then fill in the details about your GitLab account.

Manually Editing Providers in Postgres

  1. To manually add providers in Postgres, first connect to the database endpoint using administrative credentials. We recommend using psql for this.

  2. Once you have authenticated to the endpoint, ensure that you’re connected to the ‘platform’ database. Then, delete the provider you intend to modify or remove. To create or recreate a provider, return to the DataScience.com Platform settings page and go the the Git Providers tab.

    Make sure to replace the following placeholder values with your own: {git_provider_id}

    SELECT * FROM git_providers; – find the id of the provider
    DELETE FROM git_providers WHERE id = {git_provider_id};
    
  3. To verify that your providers have been modified correctly, run the following query: SELECT * from git_providers;