mercurial hgwebdir error with basicauth in apache2
Posted
by
Dio
on Server Fault
See other posts from Server Fault
or by Dio
Published on 2010-09-26T20:37:52Z
Indexed on
2011/01/31
7:27 UTC
Read the original article
Hit count: 661
mercurial
|basic-authentication
Hello, I'm having kind of a strange error that I'm trying to track down. I was trying to setup mercurial on my home server this weekend. I seem to have it running up to the point where I'm trying to get repositories published correctly.
I'm running Ubuntu 10.04 LTS
Mercurial Distributed SCM (version 1.4.3)
I followed the hgwebdir guide: http://mercurial.selenic.com/wiki/HgWebDirStepByStep and everything seems to work great, I can pull and push my local repositories. Then I tried to add basic auth changing
ScriptAliasMatch ^/hg(.*) /var/hg/hgwebdir.cgi$1
<Directory "/var/hg">
Options ExecCGI FollowSymLinks
AllowOverride None
</Directory>
to
ScriptAliasMatch ^/hg(.*) /var/hg/hgwebdir.cgi$1
<Directory "/var/hg">
Options ExecCGI FollowSymLinks
AllowOverride None
AuthType Basic
AuthName hgwebdir
AuthUserFile /usr/local/etc/httpd/users
Require valid-user
</Directory>
This works exactly as I'd expect it to when I navigate to the directory via my web browser, but when I hg push get a long section repeating of
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/usr/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/usr/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/usr/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout)
followed by
File "/usr/lib/pymodules/python2.6/mercurial/keepalive.py", line 249, in do_open self._start_transaction(h, req) File "/usr/lib/pymodules/python2.6/mercurial/url.py", line 419, in _start_transaction return keepalive.HTTPHandler._start_transaction(self, h, req) File "/usr/lib/pymodules/python2.6/mercurial/keepalive.py", line 342, in _start_transaction h.endheaders() File "/usr/lib/python2.6/httplib.py", line 904, in endheaders self._send_output() File "/usr/lib/python2.6/httplib.py", line 776, in _send_output self.send(msg) File "/usr/lib/pymodules/python2.6/mercurial/url.py", line 247, in _sendfile connection.send(self, data) File "/usr/lib/pymodules/python2.6/mercurial/keepalive.py", line 519, in safesend self.connect() File "/usr/lib/pymodules/python2.6/mercurial/url.py", line 273, in connect keepalive.HTTPConnection.connect(self) RuntimeError: maximum recursion depth exceeded while calling a Python object
I'm a bit at a loss on this one. I'm really not sure why adding the authorization seems to work fine via my web browser but throw these errors from hg. Any help would be greatly appreciated.
© Server Fault or respective owner