This tutorial will get your github account setup to work with git and GitHub. It is primarily intended for use on HiPerGator, but will work on most systems.
- Navigate to https://github.com/ and Click the Sign up button.
- Enter the requested information to create your account.
As of August 2021, GitHub.com no longer supports using username/password to work with repositories. You should setup and add a public ssh key to your github.com account. GitHub has good instructions on doing this, but the main steps will be replicated here. If you encounter problems, I suggest checking the detailed instructions from GitHub.
-
Open a Terminal and login to HiPerGator
-
Create an ed25519 ssh key pair to use for GitHub. As outlined here, type:
ssh-keygen -t ed25519 -C "your_email@example.com"(Replacing the email address with the one you used when creating your GitHub account.)
- If you can't remember which email you used for your GitHub account, you can check at this link: https://github.com/settings/emails.
-
After typing the above command, you will be asked to enter a file in which to save the key. Hit
Enterto accept the default name.Note: The name and location of this file are important! Using a different name or changing the location will cause the key pair to not work.
-
Then you will be asked to enter a passphrase. Leave this empty. This is somewhat less secure, as anyone who has access to your private key would be able to impersonate you. However Jupyter Lab and many GUI interfaces do not work with ssh keys with a passphrase. If you want to use GitHub in Jupyter Lab, do not add a passphrase--just hit
Enterfor the passphrase and verification. -
Now that you have created the ssh key pair, we need to add the public portion to your github account. Type
cat ~/.ssh/id_ed25519.puband then copy the output. -
Go to your GitHub Settings at: https://github.com/settings/keys.
-
As outlined here, click the New SSH Key button.

-
Give the key a name, "HiPerGator" for example, and paste the public key text you copied above into the Key box.
-
IMPORTANT: Do not skip this step!! Test the key and add github.com to your known hosts. Back in the Jupyter terminal, type:
ssh -T git@github.com(do NOT replacegitwith your username. Type the command exactly as-is.- You will likely get a message that the authenticity of the host 'github.com' can't be established. Type 'yes' to continue. You will get a Warning that the host has been permanently added to the list of known hosts, and then it should have a line that says:
Hi github_username! You've successfully authenticated, but GitHub does not provide shell access.
- You will likely get a message that the authenticity of the host 'github.com' can't be established. Type 'yes' to continue. You will get a Warning that the host has been permanently added to the list of known hosts, and then it should have a line that says:
That is your indication that everything is setup correctly!
There is also a short video with a walk-through of setting up ssh keys with github (Requires UF login).
From: https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup
The first thing you should do when you install Git is to set your user name and email address. This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating:
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.comAgain, you need to do this only once if you pass the --global option, because then Git will always use that information for anything you do on that system. If you want to override this with a different name or email address for specific projects, you can run the command without the --global option when you’re in that project.
Many of the GUI tools will help you do this when you first run them.
Git uses your system's default editor--typically vim on Linux systems--as the text editor for commit messages. You can configure your preferred editor with one of the examples on this great table from the Software Carpentry git lesson:
| Editor | Configuration command (do not type the "$") |
|---|---|
| Atom | $ git config --global core.editor "atom --wait" |
| nano | $ git config --global core.editor "nano -w" |
| BBEdit (Mac, with command line tools) | $ git config --global core.editor "bbedit -w" |
| Sublime Text (Mac) | $ git config --global core.editor "/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n -w" |
| Sublime Text (Win, 32-bit install) | $ git config --global core.editor "'c:/program files (x86)/sublime text 3/sublime_text.exe' -w" |
| Sublime Text (Win, 64-bit install) | $ git config --global core.editor "'c:/program files/sublime text 3/sublime_text.exe' -w" |
| Notepad++ (Win, 32-bit install) | $ git config --global core.editor "'c:/program files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin" |
| Notepad++ (Win, 64-bit install) | $ git config --global core.editor "'c:/program files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin" |
| Kate (Linux) | $ git config --global core.editor "kate" |
| Gedit (Linux) | $ git config --global core.editor "gedit --wait --new-window" |
| Scratch (Linux) | $ git config --global core.editor "scratch-text-editor" |
| Emacs | $ git config --global core.editor "emacs" |
| Vim | $ git config --global core.editor "vim" |
| VS Code | $ git config --global core.editor "code --wait" |
As a security best-practice, it is generally best to use two-factor authentication when available. GitHub.com offers two-factor authentication and is configured in the Settings : Security section of your account.