水银库我可以成功访问存储库通过http://使用hgweb.cgi:访问通过SSH
$ hg clone http://mydomain.com/scgi-bin/hgweb.cgi/myrepo
我也能成功ssh到mydomain.com使用密码。
$ ssh [email protected]
[email protected]'s password: xxxxxx
Last login: Sat Jun 9 .....
[email protected] [~]# ls public_html/scgi-bin
./ ../ hgweb.cgi*, hgweb.config
但是,我不能推断如何通过SSH服务存储库。例如,这不起作用:
$ hg clone ssh://[email protected]/public_html/scgi-bin/hgweb.cgi/myrepo
[email protected]'s password: xxxxx
remote: stdin: is not a tty
remote: bash: hg: command not found
abort: no suitable response from remote hg!
我得出的结论是不同的http://,SSH://不知道如何运行CGI脚本,那会是正确的吗?有针对这个的解决方法吗?
(顺便说一句:这是在共享主机,其中http的根是的public_html /,SSH的根是一个目录起来。)
如果你使用'hg clone --verbose',它会告诉你类似'running ssh [email protected]“hg -R ... serve --stdio”'这是一个很大的提示,不工作。 – msw
好的,这显示了很多谢谢。我可以看到'hg clone'实际上在远程服务器上调用hg,所以我不需要通过hgweb.cgi。现在看来我只需要弄清楚如何在SSH环境中为hg设置正确的PATH,因为仍然没有找到hg。 – jontyc