Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to let TortoiseHg (Mercurial) on Windows use the Private Key file generated (by Puttygen)?

I have used Puttygen to create a public and a private key, and then is ready to let TortoiseHg on Windows 7 do a clone by going to

ssh://[email protected]/somecode 

but there seems to be no where to add the private key to TortoiseHg? (or even just the mercurial command line)

The file is already some where on hard disk as somefile.ppk Does someone know how to add it?

like image 465
nonopolarity Avatar asked Jun 01 '10 15:06

nonopolarity


People also ask

How do I make a key pair in Windows?

Creating the key pairNavigate to the directory where you saved the puttygen.exe file and open it. On the bottom right, click the Generate button. Follow the instructions and move your mouse in the blank area to generate random data. Click the Save public key button to save a modified version of the public key.


1 Answers

Either add the following to the [ui]-section of the mercurial.ini in your home directory (assuming your key is in "C:\Users\UserName\mykey.ppk"):

[ui] ssh = tortoiseplink.exe -ssh -i "C:\Users\UserName\mykey.ppk" 

or use Pageant, found in the TortoiseHg installation path (e.g. C:\Program Files\TortoiseHg\Pageant.exe). Start it, double click the taskbar-icon that appears, and add the .ppk-file.

like image 72
David Tischler Avatar answered Oct 14 '22 02:10

David Tischler