Skip to content

Using Pageant for Private Key Authentication

Gopal Adhikari edited this page Feb 10, 2014 · 4 revisions

It gets bothersome to authenticate using CLI everytime you want to pull or push from a git remote. To simplify this process, you can use Pageant which comes prepacked with GitExtensions.

  1. If you haven't installed Git Extensions, go ahead and download it to your computer.

https://code.google.com/p/gitextensions/downloads/list

  1. After the installation is done open it up and choose English as your language. In the next screen make sure to get everything highlighted green.

Git Extensions Settings

  1. Now click on the SSH option from the pane on the left and make sure the settings look like this:

Git Extensions SSH Settings

  1. Now fire up puttygen.exe (installed by default to C:\Program Files (x86)\GitExtensions\PuTTY\puttygen.exe). Generate a new private key file and (1) save the public key or copy and paste it into your GitHub account's SSH page. (2) Now secure your private key file and (3) save it somewhere under your home directory.

PuttyGen Key Generation

  1. Now to make it so that you don't get nagged by GitExtensions to type the password everytime you pull or push changes to and from a Git Repo, you need to add Pageant to your Startup. Add pageant to your Startup folder by first creating a Pageant shortcut on the Desktop and finally copying it to the Startup folder. Pageant is located by default in C:\Program Files (x86)\GitExtensions\PuTTY\. Copy that shortcut to C:\Users\<USERNAME>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.

Now when you restart the computer and pull/push something from Github, you only need to enter the password once. After that Pageant will automatically authenticate for you. However, make sure that you find the key that you created in Step 4 when you browse for it.

Click on Load SSH Key

Browse for the key and select it

Clone this wiki locally