title |
---|
Set-up |
- GitHub username
- Create a GitHub account (if you don’t already have one) at https://github.com. Advice for choosing a GitHub username: this is a professional username that you will use in work settings. GitHub accounts are not anonymous; this is for sharing work. Using your real name is common.
- Remember your username and password; you will need to be logged in during the course!
- Here is a video showing the whole process
- Earthdata Login account
- Create an Earthdata Login account (if you don't already have one) at https://urs.earthdata.nasa.gov
- Remember your username and password; you will need to be logged in during the course!
Once you have submitted your GitHub username and have been accepted as a member of the DaskHub team on the nmfs-opensci organization, you can log-into the JupyterHub.
-
Make sure to choose an R image or else you will not see the RStudio Server button. Watch a video of the login process and basic JupyterHub orientation.
-
home directory is yours and no one else can see it. To share files, you can connect to a GitHub repository or use the
shared
directory. Everyone can read and write to this directory. Please don't delete content that is not your own.
You need to tell GitHub who you are so you can push your local changes up to GitHub. There are a few ways to do this. I am going to show you a way that works on any computer, including a virtual computer like the JupyterHub.
We are going to generate a classic token.
- Go to https://github.com/settings/tokens
- Click Generate new token > Generate new token (classic)
- When the pop-up shows up, fill in a description, click the "repo" checkbox, and then scroll to bottom to click "Generate".
- For scope, select "repo".
- SAVE the token. You need it for the next step.
- Open a terminal. In Jupyter Lab, you will see a box labelled "Terminal" on the Launcher window. In RStudio, you will see a tab (usually in lower left) with the label "Terminal"
- Paste these 3 lines of code into the terminal
git config --global user.email "<your email>"
git config --global user.name "<your name>"
git config --global pull.rebase false
git config --global credential.helper store
Replace "<your email>"
with something like jane.doe@noaa.gov
. Replace "<your name>"
with something like "Jane Doe"
. Notice the quotes.
There are a few ways to do this.
a) Clone a repo, make a change, and then commit and push the change b) Clone a private repo
Option b is easiest if you are new to Git and GitHub.
- Open a terminal window
- Make sure you are in the home directory by typing
cd ~
- Clone a repo and create an RStudio project. File > New Project > Version Control > Git. Paste in this URL https://github.com/nmfs-opensci/github_setup_check and make sure it is creating the repo at
~
(home directory). - You will be asked for your GitHub username and password. For the password, enter the PERSONAL ACCESS TOKEN from Step 1.