Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 with Mercurial version 1.4.3.

I followed the hgwebdir guide 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.

share|improve this question

1 Answer 1

got a response from the great folks on the Mercurial IRC channel. This was addressed in Issue2255. I made their changes and it works like a charm.

share|improve this answer
    
Please accept this answer so that your question doesn't show up on the "unanswered questions" list. –  Martin Geisler Dec 23 '11 at 10:27

Your Answer

 
discard

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.