views:

32

answers:

1

I have a mecurial server setup and would like to use it for source control over apache. The setup i followed, however, requires that I have a .htpasswd which it uses to authenticate mecurial users. Is it possible to have this authenticated list be the people who are already users on the server so they don't have to create new id's and passwords?

A: 

Certainly. This is one of mercurial's strengths. When run as a CGI (or wsgi) it entirely trusts the REMOTE_USER environment variable. So just have apache set REMOTE_USER before running the ScriptAlias (or wsgi) and mercurial will use that authentication. Apache has many different authentication modules to interface with any user/pass system you already have.

Ry4an
How do I do that? I'm new to somewhat new to apache configurations.And thanks.
chustar
Use this http://code.google.com/p/mod-auth-external/ and this http://code.google.com/p/pwauth/ to get Apache to delegate to the system accounts via PAM.However, if the people already have system accounts the usual way to do this would be to make the http interface read-only and just have the people use ssh:// URLs for pushing -- which works without any setup since they already have user accounts.
Ry4an