Setting up the Integration
Add Git Credentials
In order to use the Git integration, you must first add credentials to your Account page in Code Ocean.
Click the Account icon
From the Credentials screen click + Add Credentials
Click <Git provider> Credentials

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.

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
In the upper-right corner of the page, click your profile photo, then click Settings.
In the left sidebar, click Developer settings.
In the left sidebar, click Personal access tokens, select Tokens (classic).
Click Generate new token, select Generate new token (classic).
Fill out the form and check the repo box for the scope.

Creating a GitLab Personal Access Token
You can create as many personal access tokens as required.
In the top-right corner, select your avatar.
Select Edit profile.
On the left sidebar, select Access Tokens.
Enter a name and optional expiry date for the token.
Select the desired scopes.
Select Create personal access token.

Creating a Bitbucket App Password (equivalent to a PAT)
In the top right corner, select the Settings cog.
Select Personal Bitbucket Settings.
In the left menu bar, select App passwords.
Click Create app password and select at least read and write repository permissions.
Select Create to generate the access token.

Was this helpful?
