Read authorization error on server

Matt Mackall mpm at selenic.com
Fri Dec 28 00:19:24 UTC 2012


On Fri, 2012-12-28 at 00:47 +0100, Morten H. Pedersen wrote:
> Hi all
>  
> I have started to use Mercurial at my job, and to learn using it I
> have set up my own Mercurial server (WinXp, Apache 2.2.22, Python
> 2.6.6, Mercurial 2.2.1, mod_wsgi-win32-app22py26-3.3.so) at home,
> which basically works fine. The PC from which I access the server is
> Win7 32, Tortoise 2.6.1. I have basic HTTP authentication working in
> Apache, although it is disabled for now, so no authentication is
> required. This works fine, as long as I allow anyone to read:
>  
> allow_push=*
> allow_read=*
>  
> If I change to "allow_read=MHP" I get "authorization failed" from
> mercurial whenever I try to clone from the server. My username is set
> correctly, as shown by hg showconfig: C:\Users\Morten\.hgrc:3:
> ui.username=MHP.

Mercurial does not use ui.username for HTTP authentication. We recommend
that ui.username be a complete email address, but it's actually a
freeform field that has no required or enforced semantics. In any case,
a global account name setting would be inappropriate: people generally
have different account names on different servers.

If you have auth disabled on your webserver, your webserver won't ask
your hg client for credentials, your client won't prompt you, and thus
no user information will be passed to hgweb. We don't/can't preemptively
pass such info through the webserver if it doesn't ask for it. Not only
would most webservers ignore it, it has unattractive privacy properties
for using public repos. In short, you must enable your webserver's auth
to authenticate with hgweb.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list