Tuesday, November 4, 2014

How to setup SSH on public git repo

Just a quick note on how to set up SSH keys for git if you using windows

These are the steps I’ve used for connecting to GitHub with SSH on Windows using the PuTTY tools.

Always remember any git project has a web interface , user need an account to clone, and it takes a list of "keys"  (SSH Public ) to be added to this web interface.

Step 1 - Download Putty Tools

Download these three PuTTY tools:
  1. plink.exe
  2. pageant.exe
  3. puttygen.exe
Move them to some place permanent, for example c:\bin.

Step 2 - Add GIT_SSH Environment Variable

Find Windows enviornment variable settings in Control Panel Set name to GIT_SSH and value to the location of plink.exe.
Add new environment variable

Step 3 - Create a Key

Use puttygen.exe to generate and public/private key.
Putty key generator example Save the private key somewhere with a passphrase and then copy the public key text to the clipboard.
Select and copy the public key text

Step 4 - Add Key to GitHub

Login to GitHub and under Account settings > SSH Keys add a new key and paste your key.
Add new SSH key to GitHub

No comments:

Post a Comment

bee-social