简体   繁体   English

在Windows上为Mercurial创建SSH服务器

[英]Creating SSH server on Windows for Mercurial

I'm struggling to find an answer for this, although it seems like such a common thing. 尽管这看起来很普通,但我一直在努力寻找答案。 Perhaps I'm approaching it from the wrong angle. 也许我是从错误的角度来对待它。

I would like to set up an SSH server so people can clone and push to a repository on a Windows machine. 我想设置一个SSH服务器,以便人们可以克隆并推送到Windows计算机上的存储库。 Ie

hg clone ssh://bob@MY_COMPUTER/C:\\repository

I've installed Bitvise SSH Server and have it set up and running and I am using TortoiseHG to manage the repository. 我已经安装了Bitvise SSH服务器,并且已经安装并运行它,并且我正在使用TortoiseHG来管理存储库。 I can connect via SSH to this computer: ssh bob@MY_COMPUTER . 我可以通过SSH连接到此计算机: ssh bob@MY_COMPUTER However, Mercurial seems unable to find the repository. 但是,Mercurial似乎找不到存储库。

What am I missing? 我想念什么? Do I need to set TortoiseHG up to start publishing the repository somehow? 我需要设置TortoiseHG以某种方式开始发布存储库吗?

Read carefully hg help url and eliminate all Windows-isms from URL 仔细阅读hg help url并从网址中消除所有 Windows现象

  • path is relative to the remote user's home directory by default. 默认情况下,路径相对于远程用户的主目录。 Use an extra slash at the start of a path to specify an absolute path: 在路径的开头使用一个额外的斜杠来指定一个绝对路径:

    ssh://example.com//tmp/repository SSH://example.com//tmp/repository

I suppose , for Win-hosts absolute path will start from the root of drive with $HOME of connected user, but relative path is more predictable solution ,对于Win-hosts,绝对路径将从具有连接用户的$ HOME的驱动器的根开始,但是相对路径是更可预测的解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM