带有Windows中央存储库的DVCS [英] DVCS with a Windows central repository

查看:82
本文介绍了带有Windows中央存储库的DVCS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前正在使用VSS进行版本控制。我们很少有开发人员对分布式模型感兴趣(并且想要摆脱VSS)。我们的网络充满了Windows机器,虽然我们的IT部门有维护Linux机器的经验,但他们不希望这样做。



什么DVCS系统可以在Windows上托管他们的中央存储库,同时提供..


  1. 推送对存储库的访问权。

  2. 基本认证。大多数情况下只是一种允许或拒绝访问整个存储库的方法。无需进行细粒度访问。

  3. 服务器进程使用户不需要对存储库进行写入权限,从而降低了意外混淆它的风险。

  4. ol>

    在客户端,像Tortoise这样的GUI可能或多或少是一个需求(对不起,Windows shell很糟糕。由于我们的IT部门资源已经非常不足,因此易于安装将是一个巨大的优势。只要客户端能够存储凭证,使用Windows凭据进行身份验证将是一个优势,但不是一个要求。



    我有一个(真的)快速的外观在Git,Mercurial和Bazaar上。


    • Git 似乎使用ssh或简单的WebDAV进行存储库访问,许可。

    • Mercurial 有一个内置的http服务器,但这似乎仅用于拉取目的。 更新: Mercurial也支持推送。



    是否有任何DVCS系统的Windows服务器进程,并且有人设法在Windows环境中设置一个进程?

    如果这是一个重复的问题,请道歉。我无法找到它。



    更新



    Mercurial为推送目的而工作!详细清单所需内容可以在下面找到答案。

    解决方案

    Mercurial几乎肯定是您在Windows上最简单的选项。



    如果您不关心认证,您实际上可以简单地允许 hg serve 来允许推送。为此,您只需将以下内容添加到您希望提供服务的存储库中的 .hg / hgrc 文件中:

      [web] 
    allow_push = *
    push_ssl = false

    第一行表示任何人都可以推送到此存储库。第二个告诉Mercurial允许不使用SSL推送,因为 hg serve 当前不支持HTTPS。此时,用户可以推送到您的存储库,而无需在任何地方建立账户。如果你只是一家小商店,那可能很好 - 尤其是因为你可以使用Mercurial签署变更集的能力来保证比HTTP Basic提供的验证更高的水平。



    然而,对于一个更大的商店,您至少想要提交一个简单的屏障是完全正确的。为此,您需要进行两项更改。首先,您需要将Mercurial置于具有反向代理支持或CGI支持的Web服务器之后。值得庆幸的是,最近的IIS版本都支持这两种版本您可以参阅 CGI方向Mercurial红皮书用于Mercurial特定的步骤,以及微软在IIS 6中设置CGI应用程序的指南,以获取IIS方面的帮助。

    接下来,你将需要建立一些基本的认证。 IIS提供了即开即用的HTTP Basic,作为奖励,它可以直接对您的域进行身份验证,从而将管理开销降到最低。

    最后,您将要通过指定逗号分隔的用户名列表来改变 allow_push 行来仅支持特定用户。例如:

      allow_push = benjamin,ted,the_cow 

    就是这样。 Mercurial现在允许来自可以通过HTTP基本身份验证进行身份验证的用户推送,并允许其他人拉取。

    We are currently using VSS for version control. Quite few of our developers are interested in a distributed model (And want to get rid of VSS). Our network is full of Windows machines and while our IT department has experience maintaining Linux machines they would prefer not to.

    What DVCS systems can host their central repository on Windows while providing..

    1. Push access to the repository.
    2. Basic authentication. Mostly just a way to allow or deny access to the whole repository. No need for fine grained access.
    3. Server process so users don't need write right to the repository reducing the risk of accidentally messing with it.

    On the client side a GUI such as Tortoise would be more or less a requirement (Sorry, Windows shell sucks. :|). Ease of installation would be a huge plus as our IT department is already quite low on resources. And using windows credentials for authentication would be an advantage but not a requirement as long as the client is able to store the credentials.

    I have had a (really) quick look at Git, Mercurial and Bazaar.

    • Git seemed to use ssh or simple WebDAV for repository access, requiring write permission for the users.
    • Mercurial had a built in http server, but this seemed to be only for pull purposes. Update: Mercurial supports push as well.
    • Bazaar Seemed to use sftp for repository access, again requiring a write permission for the users.

    Are there windows server processes for any DVCS systems and has anyone managed to set one up in a Windows land?

    And apologies if this is a duplicate question. I couldn't find one.

    Update

    Got Mercurial working for push purposes! Detailed list what was required can be found as an answer below.

    解决方案

    Mercurial's almost certainly your easiest option on Windows.

    If you didn't care about authentication, you actually can trivially allow hg serve to permit push. To do so, you merely need to add the following to the .hg/hgrc file in the repository you wish to serve:

    [web]
    allow_push = *
    push_ssl = false
    

    The first line says that anyone may push to this repository. The second tells Mercurial to allow pushing without SSL, since hg serve does not currently natively support HTTPS. At this point, users can push to your repository without having an account anywhere. If you're simply a small shop, that's probably fine--especially since you can use Mercurial's ability to sign changesets to guarantee a much higher level of verifiability than HTTP Basic will provide, anyway.

    For a larger, shop, though, you'd be totally right in wanting at least a simple barrier for committing. To do that, you need to make two changes. First, you'll need to put Mercurial behind a web server with either reverse proxy support or CGI support. Thankfully, recent versions of IIS support both. You can consult the CGI directions in the Mercurial Redbook for Mercurial-specific steps, and Microsoft's guide to setting up CGI applications in IIS 6 for help on the IIS side.

    Next, you'll need to set up some basic authentication. IIS provides HTTP Basic out-of-the-box, which, as a bonus, can authenticate directly against your domain, keeping administrative overhead to a minimum.

    Finally, you'll want to change the allow_push line to support only specific users by specifying a comma-delimited list of user names. For example:

    allow_push = benjamin, ted, the_cow
    

    That's it. Mercurial will now allow push from users who can authenticate via HTTP Basic authentication, and allow pull from everyone else.

    这篇关于带有Windows中央存储库的DVCS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆