Cloning a read-write github repository using TortoiseHg
Solution 1: [1]
I have found a way around this but it's pretty hackish. I noticed that ProcessMonitor was showing it looking for ssh.exe in several different paths so I copied the TortoisePlink.exe in the TortoiseHg folder and named it ssh.exe.
copy "C:\Program Files\TortoiseHg\TortoisePlink.exe" "C:\Program Files\TortoiseHg\ssh.exe"
With just this change it will still fail the authentication. You'll get a pop-up box and this.
importing Hg objects into Git
abort: the remote end hung up unexpectedly
So you need to get a hold of pageant.exe that comes with the main PuTTy install. Start that up and add your key to it. Then run the clone command again and it should authenticate just fine.
Solution 2: [2]
After spending hours and hours trying to solve this, I've found one guide what explained it perfectly.
This is the URL: http://www.codeproject.com/Articles/376058/Step-by-step-Setup-TortoiseHg-for-gitHub
One thing not mentioned in the guide is that the 32-bit version of Pageant bundled with TortoiseHG cannot recognise the "[email protected]" part in an url, and keeps asking for it. Downloading the 64-bit version of Pageant fixes this bug.
Download 64-bit Pageant: https://splunk.net/w/PuTTy64bit
I've opened a ticket for including 64-bit Pageant with TortoiseHG: https://bitbucket.org/tortoisehg/thg/issue/2145/bundle-64-bit-pageant-with-64-bit
Solution 3: [3]
I found I had to launch Pageant and load my SSH key and then initially clone using the command-line e.g.:
hg clone git+ssh://[email protected]/<username>/<repo>.git
But from then on I could use TortoiseHg against GitHub (push and pull) just fine (although Pageant needs to be running for authentication to work).
Solution 4: [4]
I'm using "plink.exe" and "pageant.exe" instead of "TortoisePlink.exe". "pageant.exe" provides the pass phrase automatically when "plink.exe" needs it.
Solution 5: [5]
I solved this problem by copying TortoisePlink.exe to ssh.exe. Then I placed ssh.exe in my path. As long as pageant is running, that works for me.
Given that I needed ssh.exe in my path, I wonder if hggit even reads the ssh= line at all.
This is still hackish, but a little less hackish than @Nathan's technique (I'm not a fan of messing with files inside \Program Files)
Credits
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Credit |
---|---|
Solution 1 | Nathan Palmer |
Solution 2 | hyperknot |
Solution 3 | Duncan Smart |
Solution 4 | kuy |
Solution 5 | Emil Lerch |