I'm trying to clone my personal fork on github using the git+ssh protocol with TortoiseHg. It's giving me a rather strange error. Here is the command
hg clone git+ssh://[email protected]:myusername/thefork.git
This is after I have installed the hg-git module and it works just fine to clone using the git:// syntax. But I believe it's having trouble with the ssh. The error I'm getting is this.
importing Hg objects into Git
[Error 2] The system cannot find the file specified
I have tried adding manually the ssh command into the mercurial.ini file like this
[ui]
username = [email protected]
ssh="C:\Program Files\TortoiseHg\TortoisePlink.exe" -ssh -2 -i "C:\Source\SSHPrivateKey.ppk"
But I still get the same error. Any ideas?
Update 1
If I run the same command from the Git Bash shell it works just fine. I get this.
importing Hg objects into Git
Counting objects: 1559, done.
Compressing objects: 100% (586/586), done.
Total 1559 (delta 960), reused 1534 (delta 947)
importing Git objects into Hg
at: 0/86
updating to branch default
219 files updated, 0 files merged, 0 files removed, 0 files unresolved
I'm assuming it's because it can find ssh.exe and my key is already imported. I can add the path of ssh.exe to the windows command prompts path and then instead of the previous error I get this.
importing Hg objects into Git
Permission denied (publickey).
abort: the remote end hung up unexpectedly
It seems that it's looking specifically for ssh.exe eventhough I have specified the alternate ssh path in mercurial.ini. But my guess here is that that configuration is only for a ssh enabled mercurial server and doesn't apply to the hg-git plugin.