- Git
- Github Account
- KeePass with KeeAgent
- Putty Package
- plink
- puttygen
- ssh-keygen
- Start puttygen.exe
- Configure number of bits. Github can handle 4096 bits.
- Click on Generate and move the mouse
- Go to
Conversions->Export OpenSSH
and export your private key- A password can be set, but keep in mind that the password must be entered every time the key is used
- Copy your private key to
~/.ssh/id_rsa
. - Create the RFC 4716 version of the public key using ssh-keygen
ssh-keygen -e -f ~/.ssh/id_rsa > ~/.ssh/id_rsa_RFC4716.pub
- Convert the RFC 4716 version of the public key to the OpenSSH format:
ssh-keygen -i -f ~/.ssh/id_rsa_RFC4716.pub > ~/.ssh/id_rsa.pub
- Copy the string from the public key field at the top, which starts with "ssh-rsa ..."
- Move to https://github.com/settings/keys
- Create a new key
- Provide a name
- Paste the string from the public key field of puttygen
- Save it
- Create a new or open a database
- Create a new entry for your github.com account
- Select the tab Advanced
- Click on Attach
- Select the previously saved public and private key generated by puttygen
- Select the tab KeeAgent
- Check Allow KeeAgent to use this entry
- Select the private key in the Attachement area of the Private Key File Location
- For further details about KeeAgent, click here
- Save the entry
You can check if the key is loaded by opening the KeeAgent window via Tools -> KeeAgent. If the key is not loaded yet, load it this time manually by right clicking on the entry and selecting Load SSH Key. The ssh key should be loaded and visible in the KeeAgent window now.
Set a global environment variable GIT_SSH to tell git to use plink. GIT_SSH must point to the full windows path of plink.exe, i.e. “C:\Program Files (x86)\putty\plink.exe”
- Start KeePass and open the database where the ssh key is stored
- Look for a SSH address of a git repository to clone, e.g. take this one.
- git clone <ssh_repository_address>
- If it is the first time accessing github.com like this, it may be necessary to "trust" this host and confirm.