Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

ssh://somebody@code.somewhere.com/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?

share|improve this question

5 Answers 5

From the answer almost the same question at stackoverflow.com (by David Tischler):

Add the following to the [ui]-section of the mercurial.ini in your home directory:

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

Or if you want to specify your ssh username, add

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

(assuming your key is in "C:\Users\UserName\mykey.ppk").

Pageant (already mentioned by others) should work also (even though I haven't tried it myself).

share|improve this answer

Since this un(fully)answered question is towards the top of the Google results; you can find a detailed guide by row1 @ http://row1.info/news/91-blog/265-using-tortoisehg-with-bitbucket-and-ssh.html

share|improve this answer
    
Nice guide ;) ... –  row1 May 9 '11 at 9:45

Looks like you need to run pageant.exe on the .ppk file generated by putty to register it in a place that hg can find it.

share|improve this answer

You don't add the key to TortoiseHg or to Mercurial. Instead, these programs will call Putty (via plink.ext, I think) and that program will need to know about the key.

It's been a while since I used Windows, but as I remember, Putty lets you save your settings under a profile name. That includes the username, hostname, and private key to use. If you create a profile called foo, then cloning from ssh://foo/ should work.

share|improve this answer

you should edit hgrc.d/Mercurial.rc

simple search for line with

ssh = "TortoisePlink.exe" -ssh -2

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.