使用密码在备用端口和特定密钥上为 SSH 配置 Mercurial?

NVR*_*RAM 5 ssh mercurial sshd

我正在尝试将 mercurial 配置为在远程计算机上使用,该计算机在备用端口上运行sshd,并且我的登录需要使用密码的特定密钥。 ssh已配置并且工作正常,如下所示:

 ssh -i ~/.ssh/id_rsa-xyz -p 1234 myuser@barney.example.com
Run Code Online (Sandbox Code Playgroud)

我的问题是hgrc文件中使用别名 ( barney-stuff) 或default-push属性中的任何一个进行此操作的内容:

 hg push barney-alias
 hg push
Run Code Online (Sandbox Code Playgroud)

我在 Mercurial 上看到的大多数ssh文档都假定默认端口和预加载的密钥。

我尝试将其添加到存储库的hgrc文件中:

 ssh = /usr/bin/ssh -i /home/me/.ssh/id_rsa-xyz -p 1234
 default = ssh://myuser@barney.example.com//hgroot/project1
Run Code Online (Sandbox Code Playgroud)

但是hg push只是挂起。

NVR*_*RAM 4

我的坏处 - hgrc文件应该有部分标题:

 [ui]
 ssh = /usr/bin/ssh -i /home/me/.ssh/id_rsa-xyz -p 1234
 [paths]
 default = ssh://myuser@barney.example.com//hgroot/project1
Run Code Online (Sandbox Code Playgroud)

随着这一变化,它给了我错误:

remote: abort: requirement 'fncache' not supported!
abort: no suitable response from remote hg!
Run Code Online (Sandbox Code Playgroud)

这是因为远程计算机只有 1.1 之前版本的 Mercurial。