Connect GitHub to a Project

cc-zero.png   This article is licensed under CC0 for maximum reuse. 

GitHub is a commonly-used web-based Git repository-hosting service. You can connect oneGitHub repository per OSF project. Different repositories can be linked to different components within the same project. Files added to your GitHub repository will be accessible via OSF. Likewise, files added to the GitHub repository from your OSF account will update your GitHub account with those files. You can also create a new GitHub repository from your OSF project by clicking Create repo from the "Add-ons" tab. 

The GitHub add-on allows you to connect external content to OSF. This connection does not store or back up this content on OSF. To back up your content to OSF Storage, consider Registering Your Project.

  1. Enable GitHub In Your Project
  2. Configure GitHub
  3. Select A Repository
  4. View Branches

1. Enable GitHub in your project

First, open your project, then click theAdd-ons tab in the navigation bar.

You will be taken to the "Add-ons" page for the project.

In the list of add-ons, click the Enable link next to GitHub.

The GitHub terms will appear.

Read the terms, then click the Confirm button.

2. Configure GitHub

Find GitHub in the "Configure Add-ons" section, then click the Connect Account link.

Log in to GitHub, then you will be taken to the "OAuth" page for GitHub. If you want to connect to an organization, click Grant (if you're an owner of the organization) or Request (if you're a member of the organization).

Then click the greenAuthorize CenterForOpenScience button.

The "Import GitHub Account" modal will appear.

Click Import.

Your GitHub repositories and organizations will be imported into your OSF project.

3. Select a repository

Next, select a repository from the menu, then click Save.

GitHub will be connected to your project.

4. View branches

To switch to different branches, select the root folder from the file tree. The "Branch" menu will appear in the toolbar.

Click inside the menu to select a different branch to view.

cc-zero.png This article is licensed under CC0 for maximum reuse. 
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.