Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The instructions you linked for git would basically work as stated for Mercurial, but without all the mucking about with making a bare repository.

Note that on the Mercurial wiki page you linked, it does mention ssh setup, although perhaps not as prominently as you'd like.

Also, hg /does/ come with a simple, self-contained server: hg serve. It doesn't support authentication, because there's a bunch of http servers that can do that for you better and with less bugs than we'd inevitably have.



The instructions you linked for git would basically work as stated for Mercurial, but without all the mucking about with making a bare repository.

Except that if you're running Windows rather than Linux, they don't. I have literally just tested it to make sure I'm not imagining things.

The difference is that with Git you probably also have Git Bash installed on Windows, which while somewhat clunky does at least provide a fairly standardised mechanism for setting up keys etc.

To my knowledge, there is no equivalent for Hg, and attempting to use hg with an ssh:// path to the repository seems to depend on what other software you have installed (Tortoise*, for example).

If you know better, my team and I would love to learn something. This has been bugging us for years and across multiple projects, and none of us has ever found a simple, effective way of doing it.

For the record, the mention of SSH setup on the page I linked to is literally just that: a mention, with no further details at all, and as noted above the obvious change of specifying an ssh:// path to a repository instead of a local one doesn't work by default on Windows. There's also a second entry for "Shared SSH", but that goes to a separate page describing half a dozen components that mostly aren't included with hg out of the box and again seem to lack much documentation in some cases.

[Edit: Yes, there is also hg serve, but as you point out it lacks even basic security checks, and even the main Mercurial web site doesn't recommend relying on hg serve for more than temporary purposes.]

[Edit 2: Rephrase to clarify shared SSH details.]


I'm afraid I know absolutely nothing about Windows. I know ssh is kind of a basketcase there, and I think tortoise is your best bet.

Are you trying to use Windows as a server or as a client?


The configurations I've seen are trying to use some sort of Linux-based server or NAS, and a variety of clients including some on Windows.

FWIW, I've just been told elsewhere in the thread that what we've been trying using SSH should have worked out of the box as long as Hg and TortoiseHg were both installed (and, I assume though we didn't state this, as long as Hg is installed and properly reachable on the server side).

So, while I can confirm that the simple SSH access doesn't work reliably here right now, it is starting to sound like we've hit some unfortunate case that isn't necessarily Hg's fault. If so, I apologise if my comments were unfairly harsh, though I would still suggest that Hg would be more user-friendly if it could handle SSH connections itself without relying on additional software that must be installed separately.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: