Setting up the Integration

Add Git Credentials

In order to use the Git integration, you must first add credentials to the Account page in Code Ocean.

  1. Click the Account icon

  2. From the Credentials screen click + Add Credentials

  3. Click <Git provider> Credentials

  4. Enter your Git provider's username and a Personal Access Token (PAT). Click the developer settings link to visit the webpage where a PAT can be generated. See below for more information.

If <Git provider> Credentials isn't an option under + Add Credentials, please ask your Code Ocean admin to configure Git provider integration from the Admin Dashboard.

Generate a Personal Access Token (PAT) for Code Ocean

Follow the steps below to generate a PAT in your Git provider's account. Note that the exact process varies depending on the Git provider, but the objective is to retrieve the token from the Git provider and add the token to your Code Ocean account.

Creating a GitHub Personal Access Token

  1. In the upper-right corner of the page, click your profile photo, then click Settings.

  2. In the left sidebar, click Developer settings.

  3. In the left sidebar, click Personal access tokens, select Tokens (classic).

  4. Click Generate new token, select Generate new token (classic).

  5. Fill out the form and check the repo box for the scope.

For more information about how to generate a GitHub PAT, read this article from GitHub.