Any Mercurial client can clone a project (i.e. create a copy of it on another machine); but only authorized users can push updates to the code on the server. The programmer that wishes to do so must have a username/password stored on the server. Here are the steps to add a username (foo) and password (bar) hash to the mercurial repository.
- Log onto the server with remote desktop.
- Start a command window and change the current directory to the mercurial folder.
- Issue this command (for user “foo” with password “bar”):
htpasswd hgusers foo
You will be prompted to enter the password twice:
New password: ********
Re-type new password: ********
Adding password for user foo
When a push is attempted the user is prompted for a username and a password. Here is a screen shot of two push attempts – one before and one after the user is added: