GitHub public key authentication

Sunday 10 May 2015

After creating a GitHub account, you need to setup your computer so that you can git push. When cloning a project, you chose SSH or HTTPS. I like to clone my projects in SSH as it will use my keys.

SSH Authentication Scenario

Here’s a diagram explaining how those keys are used when you want to git push your code.

Public Key SSH Connection explained

In this SSH authentication scenario, we can view the private key as a vault. When the client encrypts the message from the server, you can picture it as putting the message into the vault, and closing it. Then GitHub opens the vault with the public key and check the message in it is the same as the one he sent. If it’s not, it means that your did not use the vault (private key) matching the public key GitHub has associated to your profile.

What you need to know

Would you like to learn programming? I am CTO of Le Wagon, a 9-week full-stack web development bootcamp for entrepreneurs, and would be happy to have you on board!

comments powered by Disqus