Skip to content

NBGitPuller

What Is nbgitpuller?

NBGitPuller allows you to share and distribute content from Git repositories (e.g., Jupyter Notebooks) with students via a shareable link. There is no need to manually download files or upload them to JupyterHub. Knowledge of Git or other version control systems is not required.

This link opens the JupyterHub (login required), automatically downloads the latest version of the remote repository and redirects directly to the desired directory or notebook.

⚠️ Important: Collecting content from your users requires an alternative method, as NBGitPuller does not “push” and only “pulls”. So if the users want to push to a git repository, they have to directly use git. Avoid mixing git with automatic npbitpuller since it can cause problems.

See the nbgitpuller documentation for more information.

Option A – Use the Link Generator Tool

  1. Go to: nbgitpuller link generator (or direct generator link from docs)

  2. Fill in:

    • JupyterHub base URL (e.g. https://uni-muenster.jupyterhub.nrw)
    • Git repository URL: e.g. https://github.com/jakevdp/PythonDataScienceHandbook (remember to remove .git from the URL so that the created folder does not have it as a part of the folder name)
    • Branch (e.g. main or master)
    • File to open (optional – path to .ipynb) : e.g. notebooks/01.00-IPython-Beyond-Normal-Python.ipynb
  3. Click "Generate Link"

  4. Paste the generated link into Learnweb, Moodle, or an email, for example.

⚠️ Important: Please note that you have to change tree to lab/tree in the urlpath of the generated link, so that the notebook will be opened in a jupyterlab session and not just in the classic Jupyter notebook interface.

Option B – Build a Link Manually Format:

https://<JupyterHub-URL>/hub/user-redirect/git-pull?
repo=<GitRepoURL>&
branch=<branch-name>&
urlpath=<interface>/<repo-folder>/<notebook>

<interface>: /lab/tree

Example:

https://uni-muenster.jupyterhub.nrw/hub/user-redirect/git-pull?
repo=https://github.com/jakevdp/PythonDataScienceHandbook&
branch=master&
urlpath=lab/tree/notebooks/01.00-IPython-Beyond-Normal-Python.ipynb