Pulling from a Mercurial repository over ssh with non-default ports

5,427

Solution 1

The simplest thing would be to put an entry in ~/.ssh/config, something like:

Host myserver.com
Port 2345

Solution 2

You just need

hg -v pull ssh://[email protected]:2345/full_pathname   

eg.

hg -v pull ssh://[email protected]:2345//srv/hg/username/repos 

-p is not a recognized option for hg pull. Note your path syntax above is also wrong

hg -v pull ssh://[email protected]:2345/

is not correct syntax.

Share:
5,427

Related videos on Youtube

GJ.
Author by

GJ.

Updated on September 17, 2022

Comments

  • GJ.
    GJ. almost 2 years

    I'm trying to pull changes from a server which has sshd on port 2345 and an hg server listening locally on port 5432. I already have certifcate-based authentication for ssh, so there no need for a password.

    This doesn't work:

    hg -v pull ssh://[email protected]:2345/ -p 5432
    

    since the pull command apparently takes the port number from where I assumed ssh would be taking it...

    Any ideas how to do this?