FAQ—GitHub Integration

If your capsule wasn’t initially cloned from a GitHub repo, it’s possible to push the Capsule to GitHub and then create a new Capsule from the repo.

The connection to GitHub won’t be saved when you shut down the Cloud Workstation deployment session.

Files that are marked as ignored by Git won’t be pushed to GitHub and therefore will be missing from the new capsule.

What’s the difference between importing and cloning from a GitHub repo to a new capsule?

Importing from a GitHub repo is a one-time operation that will not keep a link to the GitHub repo. Cloning will keep a link to your GitHub repo and allow you to work directly against your GitHub repo from Cloud Workstations.

What happens when I publish a capsule that was linked to GitHub?

You can publish a capsule when you want to release a stable version and make it available across your company. A separate read-only capsule with a separate Git repo is created for the published version within Code Ocean’s internal Git server.

Consecutive versions are published in the same capsule. Commits are squashed so that there is one tagged commit per published version.

What happens when I create a blank capsule?

  • A Git repo is created for the capsule within Code Ocean’s internal git server.

  • Commits are automatically pushed to Code Ocean’s internal Git server.

  • External pushes to the capsule’s Git repo are automatically pulled to the capsule.

  • Conflicts are inherently avoided.

How can I retrieve my personal access token (PAT)?

In any terminal in Cloud Workstation, type git remote -v, and copy the key string in the output URL. The key string is the personal_access_token below:

https://{user_id}:{personal_access_token}@github.com/{account}/{repo}

What happens to GitHub repos with multiple branches?

You can switch branches in the capsule view (check out this article). In the cloud workstation, you can use git commands to switch between branches.