Sign inGet started

Getting started

Welcome to Deepnote

Working with files

Linking a GitHub repo

Connecting to data sources

Coding and analysis tools

Linking a GitHub repo

Deepnote allows you to import both public and private repositories from GitHub, just as you would with your local computer.

What can I do with a linked repository?

If you want to include a private repository or a public one that you want to push to, you can link it to your Deepnote project. This allows you and all your project collaborators to git commands from the terminal without any additional authentication.

Keep in mind that when it comes to collaboration, Deepnote provides many native solutions. For example, consider the following use cases for collaboration that don't require GitHub:

  • Sharing notebooks with access controls
  • Real-time and asynchronous notebook collaboration
  • Native versioning notebooks

However, Deepnote's GitHub integration makes the following workflows simple:

  • Using a private Python module in Deepnote notebooks
  • Augmenting local library/package development
  • Importing .ipynb files from GitHub to Deepnote's native representation

If you want to link a repository but you don't need to push to it, simply use git clone <repo url> from the terminal in Deepnote.

Linking a repository to your project

On the Project tab of your notebook, scroll to the FILES section, click on the + icon, and select Connect a GitHub repository.

GitHub location

In the Link GitHub Repository modal, paste the URL of your repository and click the Link GitHub Repository button.

GitHub link modal

You will now be able to see your GitHub project in the FILES section. You can now open a terminal and use git commands as normal, as well as accomplish the use cases listed above.

GitHub files preview

If this is the first time you're linking a repository, you will also need to install our GitHub application.

Installing the GitHub application

Deepnote connects to GitHub through a GitHub app. You first need to install the Deepnote GitHub app on your organization's or personal GitHub account. This process only needs to be completed once per account or organization.

When you try to link a repository before installing the Deepnote GitHub app, you will be prompted with a message to connect GitHub to your organization. Click the Add the application button to install the Deepnote GitHub app.

Add Deepnote to GitHub

Authentication under the hood

We use short-lived access tokens to authenticate git commands. To be able to use this approach, we access the repository via HTTPS protocol rather than SSH. The token is valid for 10 minutes and only grants access to the repository linked to the given project. We use the Custom Git Credential Helper to pass the token to the git commands.

Revoking access

In case you no longer want Deepnote to have access to some or all of your repositories, you can either revoke access to some repositories or uninstall the Deepnote GitHub application completely in your organization's GitHub settings at<your-organization>/settings/installations .

We also verify if the person who linked the GitHub repository to a Deepnote project still has access to the GitHub repository. This means that if somebody leaves your organization or no longer has access to the repository in question, they'll no longer be able to access the repository through Deepnote.

Pushing notebooks to git as .ipynb files

To push Deepnote's specialized notebooks to git, click Download from the three-dot menu in the top-right corner of a project. Extract the archive and then choose between the following two options:

  • 1: Organize the notebooks the way you need on your local machine and push to a git repository from there.
  • 2: Upload the notebooks (.ipynb files) back to Deepnote's filesystem and use the terminal to push to git.

Is this an important feature for you? Please tell us more on our Product Portal.