Mercurial を使用していますが、hg push を使用しようとすると、次のエラーが発生します。
abort: HTTP Error 500: No such file or directory
サーバー情報:
- Nginx と Mercurial
- デビアン 7.1
理由はありますか?引きはうまくいきます。
編集: http でのプッシュを有効にすることで、スタック トレースを確認できます: error.html
EDIT2:ただし、http を使用する可能性を無効にすると、最初のエラーが返されます。
EDIT3:トラックバックを行っているときのエラーは次のとおりです。
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 87, in _runcatch
return _dispatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 684, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 466, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 738, in _runcommand
return checkargs()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 692, in checkargs
return cmdfunc()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 681, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 458, in check
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 4338, in push
newbranch=opts.get('new_branch'))
File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 1535, in push
ret = remote.unbundle(cg, remote_heads, 'push')
File "/usr/lib/python2.7/dist-packages/mercurial/wireproto.py", line 300, in unbundle
ret, output = self._callpush("unbundle", cg, heads=heads)
File "/usr/lib/python2.7/dist-packages/mercurial/httprepo.py", line 199, in _callpush
r = self._call(cmd, data=fp, headers=headers, **args)
File "/usr/lib/python2.7/dist-packages/mercurial/httprepo.py", line 169, in _call
fp = self._callstream(cmd, **args)
File "/usr/lib/python2.7/dist-packages/mercurial/httprepo.py", line 117, in _callstream
resp = self.urlopener.open(req)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 438, in error
result = self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 890, in http_error_401
url, req, headers)
File "/usr/lib/python2.7/dist-packages/mercurial/url.py", line 429, in http_error_auth_reqed
self, auth_header, host, req, headers)
File "/usr/lib/python2.7/urllib2.py", line 865, in http_error_auth_reqed
response = self.retry_http_basic_auth(host, req, realm)
File "/usr/lib/python2.7/urllib2.py", line 878, in retry_http_basic_auth
return self.parent.open(req, timeout=req.timeout)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: No such file or directory
abort: HTTP Error 500: No such file or directory
編集 4: /usr/mercurial に配置されるリポジトリ hgrc ファイルは次のようになります。
[web]
deny_push = root, mdpiadmin, www-data
allow_push = milos
contact = Geeks MDPI AG
verbose = true
[trusted]
users = www-data
groups = www-data
[ui]
editor = nano
merge = vimdiff
EDIT5: ngnix エラーログ:
プッシュしようとしたときのngnix側のエラーログは次のとおりです。
2013/07/29 11:07:45 [error] 14450#0: *19 no user/password was provided for basic authentication, client: 172.16.0.89, server: hg.mdpi.intra, request: "GET /psan2.5-admin?cmd=capabilities HTTP/1.1", host: "hg.mdpi.intra"
2013/07/29 11:07:48 [error] 14450#0: *20 no user/password was provided for basic authentication, client: 172.16.0.89, server: hg.mdpi.intra, request: "GET /psan2.5-admin?cmd=batch HTTP/1.1", host: "hg.mdpi.intra"
2013/07/29 11:07:48 [error] 14450#0: *22 no user/password was provided for basic authentication, client: 172.16.0.89, server: hg.mdpi.intra, request: "GET /psan2.5-admin?cmd=branchmap HTTP/1.1", host: "hg.mdpi.intra"
2013/07/29 11:07:48 [error] 14450#0: *24 no user/password was provided for basic authentication, client: 172.16.0.89, server: hg.mdpi.intra, request: "POST /psan2.5-admin?cmd=unbundle HTTP/1.1", host: "hg.mdpi.intra"
EDIT5:レポのngnix設定は次のとおりです。
server {
listen 443 ssl;
server_name hg.mdpi.intra;
ssl_certificate /etc/ssl/certs/hg.mdpi.intra.crt;
ssl_certificate_key /etc/ssl/private/hg.mdpi.intra.key;
root /var/www/hg;
access_log /var/log/nginx/hg.intra.access.log;
error_log /var/log/nginx/hg.intra.error.log;
auth_basic 'geeks Source Control';
auth_basic_user_file /var/hg/hgusers.passwd;
location / {
fastcgi_pass unix:/var/run/fcgi.sock;
fastcgi_param PATH_INFO $uri;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param AUTH_USER $remote_user;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param HTTPS on;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
}
}