apache2 中关于 basicauth 的 mercurial hgwebdir 错误

apache2 中关于 basicauth 的 mercurial hgwebdir 错误

我遇到了一个奇怪的错误,我正在尝试找出原因。这个周末,我试图在我的家庭服务器上设置 mercurial。我似乎已经让它运行到我试图正确发布存储库的地步。

我正在运行带有 Mercurial 版本 1.4.3 的 Ubuntu 10.04 LTS。

我关注了hgwebdir 指南一切似乎都运行良好,我可以拉取和推送我的本地存储库。然后我尝试添加基本身份验证更改

ScriptAliasMatch     ^/hg(.*)      /var/hg/hgwebdir.cgi$1
<Directory "/var/hg">
    Options ExecCGI FollowSymLinks
    AllowOverride None
</Directory>

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>

当我通过 Web 浏览器导航到目录时,它的工作方式与我预期的完全一样,但当我hg push看到一段重复的长段内容时

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)

其次是

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

我对此有点不知所措。我真的不确定为什么通过我的网络浏览器添加授权似乎可以正常工作,但会抛出这些错误hg。任何帮助都将不胜感激。

答案1

得到了 Mercurial IRC 频道上的好心人的回复。这个问题在问题2255。我做了修改并且效果很好。

相关内容