无需安装 Mercurial 即可远程 Mercurial
我有一台带有 ssh 的服务器,我想将其用作中央存储库。但是我无法在其上安装 Mercurial。因此,客户端如何在服务器上未安装 Mercurial 的情况下通过 ssh 推送到服务器。
谢谢
I have a server with ssh, that I want to use as a central repo. However I can not install mercurial on it. Therefore how can clients push to the server over ssh without having mercurial installed on the server.
Thank You
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您不必在该服务器上安装 Mercurial。如果您可以安装它,那么您可以通过提供“hg init”的路径来创建常规存储库,以便在此远程服务器上创建存储库。
另一种方式是 sshfs。这是一个基于 SSH 文件传输协议的文件系统客户端。
所以使用这个你可以做
我有没有这样做,但你可以尝试一下。
You do not have to install mercurial on that server. if you can mount it then you can create a regular repository by providing the path to "hg init" for creating a repository on this remote server.
Another way is sshfs. This is a filesystem client based on the SSH File Transfer Protocol.
So using this you could do
I have not done this but you could give a try.
请注意,即使您认为不能,您可能可以在服务器上安装mercurial。如果您有一个具有类似架构的系统,您可以
make local
将mercurial安装在其自己的分发目录中,然后只需scp
将其安装到服务器上。这种情况下唯一的区别是,如果您无法将结果 you@there:mercurialCopiedIn/hg 放入
$PATH
中,那么您需要使用--remotecmd 推和拉的参数说明要使用什么二进制文件。
Be aware that you can probably install mercurial on the server even if you think you can't. If you have a system with a similar architecture you can
make local
to install mercurial right in its own distribution directory and then justscp
that up to the server.The only difference in this case is that if you can't get the resulting you@there:mercurialCopiedIn/hg into the
$PATH
then you'll need to use the--remotecmd
argument on your pushes and pulls to say what binary to use.如果本地系统可以使用 sshfs 挂载远程存储库,那么就可以了。否则你就不走运了。 :-(
If the local system can mount the remote repository using
sshfs
then that would work. Otherwise you're out of luck. :-(