通过 SSH 访问共享主机上的 mercurial 存储库

Leo*_*ied 6 unix ssh mercurial shared-hosting

我有一个具有 SSH 访问权限的共享主机帐户。我已经设置了一个虚拟 Python 安装,并在以下位置拥有系统文件夹的副本$HOME~/bin, ~/lib...

我已经通过 easy_install 安装了 mercurial,一切都很好:hg可执行文件位于,~/bin/hg$PATH知道这一点。我可以在服务器上创建并提交到存储库。

但是,当我尝试通过 SSH 将我的 repo 克隆到我的笔记本电脑时,我收到了一个hg找不到的错误。

$ hg clone ssh://myuser@server/hg/foobar
remote: jailshell: hg: command not found
abort: no suitable response from remote hg!
Run Code Online (Sandbox Code Playgroud)

如何告诉 mercurial(或 SSH 或 jailshell)在哪里查找可执行文件?

Pai*_*dhi 3

hg您可以使用--remotecmd选项告诉 Mercurial 该命令在远程计算机上的具体位置hg clone。看hg help clone

您还可以将其设置在您的~/.hgrc.hg/hgrc特定存储库克隆的中。我认为它属于该[ui]部分。