Allow HTTP Push with Mercurial Server

By  on  

I have always loved git but my present work at Mozilla requires me to use mercurial.  If you weren't already aware, Firefox code is managed through mercurial!  I was recently tasked with standing up a mercurial server within a docker container and ran into an issue:  mercurial rejected pushes to the local docker container via HTTP.  Since HTTPS wasn't configured for the docker container locally, I needed to figure out how to get mercurial to allow HTTP pushes.

To allow HTTP pushes to a mercurial repo, modify the mercurial server's hgweb.conf configuration file to include:

[web]
allow_push = *
push_ssl = false

This configuration will allow you to push to your mercurial repository without SSL.  If you don't run your mercurial server with a specific hgweb.conf now, you can run mercurial server with a special config via:

exec hg serve --web-conf path/to/hgweb.conf

HTTPS is the way to go these days but for local development it shouldn't be a requirement.  I hope this helps someone!

Recent Features

  • By
    7 Essential JavaScript Functions

    I remember the early days of JavaScript where you needed a simple function for just about everything because the browser vendors implemented features differently, and not just edge features, basic features, like addEventListener and attachEvent.  Times have changed but there are still a few functions each developer should...

  • By
    Introducing MooTools Templated

    One major problem with creating UI components with the MooTools JavaScript framework is that there isn't a great way of allowing customization of template and ease of node creation. As of today, there are two ways of creating: new Element Madness The first way to create UI-driven...

Incredible Demos

  • By
    Telephone Link Protocol

    We've always been able to create links with protocols other than the usual HTTP, like mailto, skype, irc ,and more;  they're an excellent convenience to visitors.  With mobile phone browsers having become infinitely more usable, we can now extend that convenience to phone numbers: The tel...

  • By
    Check All/None Checkboxes Using MooTools

    There's nothing worse than having to click every checkbox in a list. Why not allow users to click one item and every checkbox becomes checked? Here's how to do just that with MooTools 1.2. The XHTML Note the image with the ucuc ID -- that...

Discussion

  1. Josh

    This is useful.
    With the impending BitBucket deletion of mercurial repos I’m looking to migrate to a private server on my intranet.
    I’d like to stand up a docker container for this, but struggling to find an official container. What did you use?

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!