Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to configure mercurial for use on a remote machine that has sshd running on an alternate port, and for which my login requires a particular key, which uses a passphrase. ssh is configured and working fine, as with:

 ssh -i ~/.ssh/id_rsa-xyz -p 1234

My issue is what goes into the hgrc files to make this work with either of an alias (barney-stuff) or the default-push property:

 hg push barney-alias
 hg push

Most of the ssh documentation I've seen for Mercurial presumes the default port and a pre-loaded key.

I tried adding this to the repository's hgrc file:

 ssh = /usr/bin/ssh -i /home/me/.ssh/id_rsa-xyz -p 1234
 default = ssh://

But an hg push just hangs.

share|improve this question
up vote 3 down vote accepted

My bad - the hgrc file should have the sections headers:

 ssh = /usr/bin/ssh -i /home/me/.ssh/id_rsa-xyz -p 1234
 default = ssh://

With that change, it gives me the error:

remote: abort: requirement 'fncache' not supported!
abort: no suitable response from remote hg!

Which is because the remote machine only has a pre-1.1 version of Mercurial.

share|improve this answer

Your Answer


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.