How to clone Mercurial repository from remote server?
How do I clone an Mercurial repository if private key is required for SSH?
I tried following and it does not work.
[email protected]:~/foo/test$ hg clone --ssh -i ~/keys/dukeimg ssh://[email protected]/www/bar/ abort: /home/dukeimg/keys/dukeimg: not a Mercurial bundle
You're trying to use a
ssh command line (
-i) option with
hg. It’s not supported. Because
hg doesn’t support this option, it looks for the repository to clone at
There are three possible solutions:
- Use the SSH key agent.
[ui] ssh = ssh -i ~/keys/dukeimg
Set the SSH client to use a public key for your host (
Host example.com User my-ssh-user IdentityFile ~/keys/dukeimg
-e option is meant to be used like this:
hg -e 'ssh -whatever -option' ...