通过SSH克隆mercurial存储库

alw*_*btc 2 ssh mercurial clone repository

我的主目录位于一台服务器上,而Mercurial存储库位于另一台服务器上.我想将存储库克隆到我的主目录.我们通过ssh连接到其他服务器.我怎样才能克隆mercurial存储库?

我的本地存储库应该是: /home/my_user/my_project

Hg Repository是(在另一台服务器上): /opt/Application/hg/the_project

最好的祝福

krt*_*tek 5

根据hg help urls:

- path is relative to the remote user's home directory by default. Use an
  extra slash at the start of a path to specify an absolute path:

    ssh://example.com//tmp/repository
Run Code Online (Sandbox Code Playgroud)

因此,要从远程位置下载,您必须执行以下操作:

hg clone ssh://<ip-address>//opt/Application/hg/the_project
Run Code Online (Sandbox Code Playgroud)

(注意/ip地址后的双倍!)