如何设置 Mercurial“服务器”允许在没有 apache 的情况下进行身份验证推送吗?

发布于 2024-09-17 21:17:27 字数 404 浏览 7 评论 0原文

我试图建议在工作中从 CVS 和 SVN 切换到 Mercurial。在此之前,我希望回答所有可预见的问题。

如何设置存储库以允许推送和验证用户身份?

我更熟悉管理 SVN,在 SVN 中只有几行,例如:

[users]
userA = passwordA
userB = passwordB

然后对于权限,它就像:

[general]
userA = write
userB = read

我真的很喜欢像 svnserve 这样的东西,它允许我使用成熟的 apache 来规避,因为我所有的需求是推动变更集的中心位置。我知道 Mercurial 不一定需要中心位置,但我认为这在我的工作场所会很方便。

谢谢!

I'm trying to propose switching from CVS and SVN to Mercurial at work. Before I do, I'd like to have any foreseeable questions answered.

How can I set up a repository to allow push and authenticate users?

I'm more familiar with administering SVN, and in SVN it was just a few lines like:

[users]
userA = passwordA
userB = passwordB

And then for permissions it was like:

[general]
userA = write
userB = read

I would really like something like svnserve that allowed me to circumvent using a full-blown apache, since all I need is a central location for pushing change sets. I know that Mercurial doesn't necessarily require a central location, but I think it would be convenient in my workplace.

Thanks!

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

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

发布评论

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

评论(4

蒗幽 2024-09-24 21:17:27

尝试使用SCM Manager。它适用于 Mercurial。它有一个内置的 HTTP/HTTPS 服务器,允许您管理身份验证。唯一的要求是 Java。

http://www.scm-manager.org
https://bitbucket.org/sdorra/scm-manager

简而言之,设置 Mercurial 并进行身份验证:

  1. 按照此处的入门指南进行操作。如果您使用的是 Windows,请务必使用
    scm-server\bin\scm-server.bat
    启动SCM Manager

  2. 点击存储库类型> Mercurial 设置>启动配置向导>选择:下载并安装以安装 SCM Manager 的 Mercurial 插件。

  3. 请耐心等待,下载需要一段时间。

  4. 安装完成后,屏幕将返回到存储库配置窗口。重新启动SCM 管理器。重新启动后,您现在应该能够通过 HTTP 创建和托管 Mercurial 存储库。

  5. 仔细检查安全性:
    常规>配置并取消选中允许匿名访问
    安全>用户并停用匿名

您还可以使用SCM Manager来托管Git和SVN存储库。

Try using SCM Manager. It works well for Mercurial. It has a built-in HTTP/HTTPS server and allows you to manage authentication. The only requirement is Java.

http://www.scm-manager.org
https://bitbucket.org/sdorra/scm-manager

Briefly, to setup Mercurial with authentication:

  1. Follow the Getting Started Guide here. If you're using Windows, be sure to use
    scm-server\bin\scm-server.bat
    to start SCM Manager.

  2. Click on Repository Types > Mercurial Settings > Start Configuration Wizard > Select: Download and Install to install the Mercurial plugin for SCM Manager.

  3. Be patient, downloading takes a while.

  4. When it's finished installing, the screen will go back to the Repository Config window. Restart SCM Manager. After you restart and you should now be able to create and host Mercurial repositories over HTTP.

  5. Double check security:
    General > Config and uncheck Allow Anonymous Access.
    Security > Users and deactivate anonymous.

You can also use SCM Manager to host Git and SVN repositories as well.

不离久伴 2024-09-24 21:17:27

Mercurial Server 是一个很棒的解决方案,我曾多次使用过。

Mercurial Server is an awesome solution, which I've used on a few occasions.

物价感观 2024-09-24 21:17:27

正如 @nlucaroni 在评论中提到的,一种选择是使用 SSH 身份验证。它允许经过身份验证的拉和推。我们在公司中将其与 Apache 托管的 HTTP 访问一起用于匿名拉取存储库。请参阅发布 Mercurial 存储库中的“ssh”解决方案。

As @nlucaroni mentioned in the comment, one option is using SSH authentication. It allows authenticated pull and push. We use it in our company together with Apache-hosted HTTP access for anonymous pull-only repositories. See the "ssh" solution at the Publishing Mercurial Repositories.

停顿的约定 2024-09-24 21:17:27

您可以尝试 textauth 扩展。请尝试一下并向 Mercurial 邮件列表发送一些反馈,那么也许您会请参阅将其集成到即将发布的 Mercurial 版本中。

You can try the textauth extension. Please give it a go and send some feedback to Mercurial mailing list, then perhaps you will see it integrated into a coming release of Mercurial.

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