Setting up SSH keys with Github

Sam Ollason
Mar 7, 2019 · 1 min read

There are the steps to take to set up SSH keys with Github.

First — Why?

There are two main ways of working with repos using the terminal. One way is to HTTPs and another is to use SSH keys.

Once you set up using SSH keys you no longer need to enter a password every time you want to, for instance, clone a repository. This speeds up your development workflow.

Another benefit is that using SSH keys is generally seen as being more secure than using passwords, because a bot can use a ‘brute force’ approach to try and guess your password.

Steps to take

Generate key-pair on client

cd ~/.ssh

ssh-keygen -C “test@gmail.com”

Copy * * * PUBLIC * * * KEY:

pbcopy < ~/.ssh/id_rsa_repo123.pub

Use Github interface to add key

On client, add ***PRIVATE*** identity as ‘current’ private want to use

ssh-add ~/.ssh/id_rsa_repo123

Use Github cli to clone repository on client

git clone git@github.com:SamOllason/repo123.git

More information:

Please see my introduction to working with SSH here.

Sam Ollason

Written by

I love building tools with Software | Developer @Green13 Solutions | previous: Goldman Sachs | GoodGym Bath Coordinator | Boardgamer

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade