Skip to content

Instantly share code, notes, and snippets.

@barryblando
Last active January 27, 2020 06:24
Show Gist options
  • Save barryblando/de2fe3463c645a94dda8581d7e1e696f to your computer and use it in GitHub Desktop.
Save barryblando/de2fe3463c645a94dda8581d7e1e696f to your computer and use it in GitHub Desktop.
Configuring Git via SSH

If you don't already have a Github account, make sure to register. It will come in handy for the future.

Replace my name and email address in the following steps with the ones you used for your Github account.

git config --global color.ui true
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR@EMAIL.com"
ssh-keygen -t rsa -b 4096 -C "YOUR@EMAIL.com"

The next step is to take the newly generated SSH key and add it to your Github account. You want to copy and paste the output of the following command and paste it here.

cat ~/.ssh/id_rsa.pub

Once you've done this, you can check and see if it worked:

ssh -T git@github.com

You should get a message like this:

Hi excid3! You've successfully authenticated, but GitHub does not provide shell access.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment