How to enable TortoiseHg (Mercurial) on Windows to use the private key file generated (Puttygen)?

I used Puttygen to create a public and private key, and then I'm ready to let TortoiseHg on Windows 7 make a clone by going to

ssh://somebody@code.somewhere.com/somecode 

but there seems to be no place to add a private key in TortoiseHg? (or even just a mercurial command line)

The file already exists somewhere on the hard drive like somefile.ppk Does anyone know how to add it?

+53
mercurial ssh tortoisehg public-key
Jun 01 2018-10-06T00:
source share
2 answers

Or add the following to the [ui] mercurial.ini object in your home directory (if your key is in "C: \ Users \ UserName \ mykey.ppk"):

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

or use the Pageant found on the TortoiseHg installation path (for example, C: \ Program Files \ TortoiseHg \ Pageant.exe). Launch it, double-click the taskbar icon that appears, and add the .ppk file.

+78
Jun 01 '10 at 18:45
source share

you need ssh key generator first

  1. cmd: ssh-keygen -t rsa
  2. open PuTTY key generator
  3. Conversions> import key: open the id_rsa file in C: \ Users \ .ssh (you may need to create a folder! You must run cmd as administrator!)
  4. Save the imported id_rsa file as id_rsa.ppk
  5. Open Pageant.exe in the TortoiseHG folder
  6. It will be displayed on the taskbar.
  7. Right-click and select Add Keys.
  8. Finally add a new ppk file

Yes, right, copy the contents of id_rsa.pub to the hg host

0
Oct 16 '18 at 5:29
source share



All Articles