1

We are using Mercurial over SSH for our development. We use Hudson for continous integration, and have deployed it on Tomcat, running on a Windows 2003 Server using the Local System account. Mercurial is configured to use Putty's plink.exe as its ssh command in Mercurial.ini, together with a private key for SSH authentication.

When Hudson attempts any Mercurial command over SSH, the operation just blocks. I can see the three processes being started: hg.exe, cmd.exe and plink.exe. On the remote machine, I can also see the SSH session being opened and the authentication key being accepted.

After that, nothing appears to happen, and everything just blocks, seemingly forever. (As a side note, subversion/SVN over SSH works from Hudson to the same server, using the same user and authentication key).

A solution would of course be the best, but at least a hint for how I should debug it to get further would be nice, since I'm stuck and haven't even got an error message right now.

Liedman
  • 111
  • 1
  • 5

3 Answers3

2

If something like that happens, always try it manually with the same user account. Try to keep as much as possible the same compared to what Hudson tries. The output will tell you what is the actual problem. Usually it is something like a certificate that you need to accept. If you need to accept a certificate use Quest's plink which is an extended version of putty plink.

Peter Schuetze
  • 1,231
  • 10
  • 17
  • This is good advice, and basically what we tried. The issue was that the user running Tomcat (and thus also Hudson) hadn't accepted the SSH server fingerprint. Problem was getting Windows to allow us to get a shell to the user in question. We had to use some Windows power tool to get that access. – Liedman Aug 27 '10 at 11:57
1

Could it be that the key is password protected? Mercuiral's wiki has some suggestions if that is the case. Mainly they suggest either a) using TortoisePlink or b) using pageant

Check out: http://mercurial.selenic.com/wiki/AccessingSshRepositoriesFromWindows

Peter Thorin
  • 111
  • 2
1

Use psexec from Sysinternals (http://download.sysinternals.com/files/PSTools.zip) to run as System account.

This

psexec -i -s cmd.exe

gives you a cmd shell as the local system user.

Peter Thorin
  • 111
  • 2