gpt4 book ai didi

linux - ssh 上的 mercurial,远程 hg 没有合适的响应

转载 作者:IT王子 更新时间:2023-10-29 01:14:59 26 4
gpt4 key购买 nike

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

如果我运行 scp -r user@host:/repo_dir ./ 我会得到 repo 的所有内容,包括 .hg 就好了。 ssh user@host "ls/repo_dir"

相同

添加 -v 什么都不做。输出是完全一样的。 -vvv

相同

最佳答案

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

另一种方法是在您的家中使用符号链接(symbolic link),或者为根 fs 添加两个斜杠。

代替:

hg clone ssh://user@host/repo_dir

使用:

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

关于linux - ssh 上的 mercurial,远程 hg 没有合适的响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23038149/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com