【问题标题】:mercurial over ssh, no suitable response from remote hgssh上的mercurial,远程hg没有合适的响应
【发布时间】:2014-05-27 02:49:28
【问题描述】:

当我运行hg clone ssh://user@host/repo_dir 时,我收到“远程 hg 没有合适的响应”和“这里没有 Mercurial 存储库(未找到.hg)!”。这是什么原因造成的?我确实可以通过 ssh 访问所涉及的服务器/文件。

如果我运行scp -r user@host:/repo_dir ./,我会得到回购的所有内容,包括.hgssh user@host "ls /repo_dir"也一样

添加-v 没有任何作用。输出完全相同。 -vvv也一样

【问题讨论】:

    标签: linux ssh mercurial


    【解决方案1】:

    原来我有错误的语法。 Mercurial 使用 scp/ssh 样式来引用文件,并且当文件路径是绝对路径时需要双斜杠,就像我的情况一样。

    替代方法是在您家中使用符号链接,或者为根 fs 添加两个斜杠。

    代替:

    hg clone ssh://user@host/repo_dir
    

    使用:

    hg clone ssh://user@host//repo_dir
    #                        ^
    

    【讨论】:

    • @Peter 编辑我的帖子说它确实遵循 scp/ssh 路径样式,但我不同意。在 scp 上 host/path 将在根目录中获得 /path。 mercurial 会得到/home/user/path。 scp 使用:hostpath 分开。无论如何只是迂腐:) 如果有人关心tools.ietf.org/html/draft-ietf-secsh-scp-sftp-ssh-uri-01#page-2,这里是一个模糊的标准
    猜你喜欢
    • 1970-01-01
    • 2013-12-26
    • 1970-01-01
    • 1970-01-01
    • 2012-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多