Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Presently we are serving Mercurial Repository (hgweb) behind the Apache server, when user pushes changes to Apache it is authenticated by userid/password (pwauth). How to restrict the push to user commits by and must be authenticate as user (pwauth) instead of otheruser2?

share|improve this question

The best way to do such a thing would be with a pretxnchangegroup hook in Mercurial itself. You'd have to inspect each commit in the set to ensure that the username matches. The reason for this being that just because someone is pushing some changesets to a server, it doesn't mean they've created all those changesets themselves.

For example, someone could have pulled changes from someone else, merged them in to their own branch, and then be pushing the result up to the server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.