如何避免 bzr+ssh://myserver/C:\mydir 中的物理路径?

发布于 2024-10-25 01:19:23 字数 790 浏览 0 评论 0原文

我从 Bazaar 开始(从 Subversion 切换过来,如果术语有时有点偏差,抱歉)。在本地使用 Bazaar 没有问题。

让 bzr+ssh:// 在我的 Windows 服务器上工作(终于!甚至 ssh 代理也工作了哇!)

现在我想要在服务器上有一个共享存储库,开发人员可以从该存储库分支到他们的计算机。我希望存储库位于特定文件夹中,例如 C:\bzr\MyProject。

当我这样做时:

bzr init-repo --no-trees bzr+ssh://myserver.com/MyProject

它在我的用户帐户的主目录中的 C:\cygwin\home\user\MyProject 中创建存储库 - 这是可以理解的,但令人担忧。

然后作为一个实验,我也尝试并成功了:

bzr init-repo --no-trees bzr+ssh://myserver.com/C:\bzr\MyProject

这在我想要的地方创建了存储库。但是,如何“映射”或“别名”URL(或 bzr),以便我的开发人员可以在其帐户下登录并使用 URL

bzr+ssh://myserver.com/MyProject

访问 C:\bzr\MyProject 中的共享存储库?

显然,由于 URL 中的物理路径,我不希望开发人员使用 bzr+ssh://myserver.com/C:\bzr\MyProject

I am starting with Bazaar (switching from Subversion, sorry if terminology is a bit off sometimes). Using Bazaar locally no problems.

Got bzr+ssh:// working on my Windows server (finally! and even ssh agent is working wow!)

Now I want a shared repository on the server from which the developers can branch to their machines. I want the repository in a specific folder, for example in C:\bzr\MyProject.

When I do:

bzr init-repo --no-trees bzr+ssh://myserver.com/MyProject

it creates the repository in C:\cygwin\home\user\MyProject in the home directory of my user account - it is understandable, but worrying.

Then as an experiment I also tried and succeeded:

bzr init-repo --no-trees bzr+ssh://myserver.com/C:\bzr\MyProject

This created the repository where I wanted. But how do I "map" or "alias" the URL (or bzr) so my developers can logon under their accounts and use URL

bzr+ssh://myserver.com/MyProject

to access the shared repository in C:\bzr\MyProject?

Obviously I don't want developers to use bzr+ssh://myserver.com/C:\bzr\MyProject because of the physical path in the URL.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猛虎独行 2024-11-01 01:19:23

好的,我自己的答案是,如果您想在 Windows 服务器上运行 Bazaar,供开发团队通过互联网访问它,
如果你不熟悉 Linux、Cygwin、SSHD 和相关的东西,那么它可能会变得比你能承受的更复杂。

事实上我放弃了 Bazaar 的想法并选择了 Mercurial。我必须说服务器上的 Mercurial 安装也很复杂,但至少它只是 Windows、IIS 和一点 Python。半天就搞定了

我在 Windows 服务器上使用 bzr+ssh:// 时遇到的一些问题是:

  1. 需要在服务器上安装 SSHD。 Bazaar 提供的 SSHD(来自精简的 Cygwin)拒绝工作。必须安装 Cygwin 并学习一些 Linux 知识,如何作为服务运行,如何配置,如何生成密钥。

  2. 很难以不要求为每个命令输入密码的方式添加新用户。需要生成密钥对,通过将密钥复制到服务器的两个位置(Cygwin 的主用户文件夹和 Window 的文件夹)进行模拟。可能需要用户登录 Windows 才能创建配置文件。不希望开发人员实际登录到服务器。

  3. 很难在服务器上的特定位置设置共享存储库。 bzr+ssh 似乎不可能。可以通过 sftp 实现。可能需要使用上面 bialix 建议的符号链接。

  4. 作为 Linux 新手,我不明白在服务器上运行 sshd 以及为开发者帐户提供 shell 访问权限的所有含义。必须使用 bzr shell 有限...文档很少。

基本上,在 Windows 服务器上安装 bzr+ssh:// 似乎就像几年前在 Windows 服务器上安装 Subversion 一样 - 困难。希望 Bazaar 也会变得更好,因为我最初选择了它而不是 Mercurial。

Ok my own answer is if you want to run Bazaar on a Windows server for a development team who will access it over the internet,
and you are not familiar with Linux, Cygwin, SSHD and related stuff then it might turn out more complicated than you can bear.

I actually abandoned the Bazaar idea and gone with Mercurial. I must say Mercurial install on the server is also steep, but at least it is just Windows, IIS and only a bit of Python. Got it running in half a day.

Some of the problems that I had with bzr+ssh:// on a Windows server are:

  1. Needs SSHD installed on the server. SSHD (from stripped down Cygwin) supplied with Bazaar refused to work. Had to install Cygwin and learn a bit of Linux stuff, how to run as a service, how to configure, how to generate keys.

  2. Hard to add a new user in a way that does not request passwords typing for each command. Will need to generate a keypair, mock with copying the keys to th server in two locations (Cygwin's home user folder and Window's too). Probably need to log on the user to Windows to create a profile. Don't want developers logging on to the server actually.

  3. Hard to set up a shared repository in a specific location on the server. Does not seem possible with bzr+ssh. Possible with sftp. Might need to use symlinks as bialix suggested above.

  4. As a newbie to linux stuff I don't understand all implications of running sshd on the server and giving shell access to the developer accounts. Have to use bzr shell limited... documentation is scarce.

Basically, bzr+ssh:// on a Windows server seems to be what installing Subversion on a Windows server was like several years ago - hard. Hopefully it will get better with Bazaar too because I chose it over Mercurial initially.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文