MacOS: Create SSH key

Most of the time when I have to clone a repo, I use the https method. Today I configured my environment with SSH keys and it was great.

To create an SSH key you run:

ssh-keygen -m PEM -t rsa -b 4096 -C “your_email@domain”

This outputs a private and public key.

Then you take your public key and paste it on your git repo profile under SSH keys.

Then you add your SSH to your session (aka SSH authentication agent)

ssh-add ~/.ssh/Your_Private_key

Then you’re ready to start cloning via the terminal.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Edgar Sanchez

Edgar Sanchez

10 Followers

A great architect - humble in spirit. dangerous with production access.