-
Notifications
You must be signed in to change notification settings - Fork 3
4. Set up Git and GitHub
Note this was installed in the environment set so shouldn't be needed here.
Login to the JupyterHub (as admin). Install jupyterlab-git This is a UI to Git for JupyterLab. This installs Git too.
sudo conda install -c conda-forge jupyterlab-git
Note this is in the environment.yml
so installation might already be done.
Then you need to set-up the GitHub account for a user (not admin). Each user will need to do these steps individually. Follow the instructions here https://nasa-openscapes.github.io/2021-Cloud-Hackathon/clinic/notebooks.html
-
Create a GitHub token for credentials https://github.com/settings/tokens/new. Copy the token because you won't see it again. You'll use it later.
-
Login to the JupyterHub not at admin and open a terminal (in notebook, it is in the top right under 'new'). Run this code (replace with your username and email).
git config --global user.name "<your github username>"
git config --global user.email "<your email>"
- Set up to store credentials
git config --global credential.helper store
- Clone a repo (your OWN repo). Basically go to one of your repos and copy the URL you see in the browser.
git clone <github repo url>
- Open the repo (in JupyterLab say) and make a change to a file. Use the Git UI, to commit the change and push. When it asks for credentials, enter GitHub username and the TOKEN
Done!!