Using SSH Key Pairs when working with a remote git repository (ex. GitHub) could save a lot of trouble and it is more secure. We will show you how to config GitHub using key pair you have generated today. (To see how to generate a key pair, you can see how to do it in Windows using PuttyGen here, or a post on generate via command line, which I will make a post later).
So let’s get started:
- First you need to make sure you have Github Account, it is free, so why not?
- Once logged in, click on your photo icon on the upper right hand cover and click on “Settings” in the drop down menu
- Once on the setting page, choose from the menu on the left “SSH and GPG keys”
- Then Click on the green button “New SSH key“
- Give a meaning for “title“, so you know what the key is for. And copy and paste your public key in the “key” box. Then click on the green button “Add SSH Key“
- If your key is invalid, you will see a message like the following, otherwise your key is added, and you are ready to clone using the private key locally.