开发者

How to setup a Mercurial "server" that allows for authenticated push without apache?

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.

Ho开发者_开发技巧w 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!


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.


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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜