Mercurial has an excellent built-in extension for serving your code to other via http.
hg help serve
but hasnt have any authentication method.
You can, of course, use ssh to control access to your project, a http server (or wsgi).
In a few minutes i had textauth extension in my linux box.
Lets get started with:
[extensions] textauth = /FULL_PATH/textauth.py [textauth] file= /FULL_PATH/text.auth
touch /FULL_PATH/text.auth hg authedit -v -c ebal Enter password: ****** Verify password: ******
Now test it
And in another shell (machine/whatever):
hg clone http://example.com:8000 myproject.hg requesting all changes http authorization required realm: mercurial user: ebal password: ****** adding changesets adding manifests adding file changes added 1 changesets with 4 changes to 4 files updating to branch default resolving manifests getting ToDo getting help.html getting image.png getting myproject.py 4 files updated, 0 files merged, 0 files removed, 0 files unresolved