- You do not need to complete this step if you are using GitHub Desktop
- If using a WINDOWS MACHINE, please use Git CMD instead of the command prompt
-
In your terminal go into the ssh folder by running:
cd ~/.ssh
-
In your current terminal (if you don't already have an ssh-key generated), generate an ssh-key by using the command:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
- You will be asked to provide an location to save the key. Press ENTER to leave this bank - it will use the current location
- You will be asked to enter a passphrase. You can skip this step if you wish by pressing ENTER
-
In your current terminal, view your ssh-key by running
cat id_rsa.pub
-
Copy the results of the previous command (you will need this later on)
- In your GitHub account, click on your icon in the upper right corner, and go to:
- Settings -> SSH and GPG Keys
- Click the Green Button labeled "New SSH Key"
- Add a title for your key, and paste the contents of your key from the previous section, in the 'Key' Section
- Click the Green Button labelled 'Add SSH Key'
Additional Instructional Resources:
- https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
- https://medium.com/devops-with-valentine/2021-how-to-set-up-your-ssh-key-for-github-on-windows-10-afe6e729a3c0
- https://www.inmotionhosting.com/support/server/ssh/how-to-add-ssh-keys-to-your-github-account/