2013-07-26 16 views
2

我使用水銀,當我試圖使用汞推,我收到此錯誤:水銀HG:「汞推」回報中止:HTTP錯誤500:沒有這樣的文件或目錄

abort: HTTP Error 500: No such file or directory 

服務器信息:

  • Nginx的與水銀
  • 的Debian 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:hgrc文件被放置在/ usr /善變看起來像這樣的回購協議:

[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; 
    } 
} 
+0

很難說出所提供的信息有什麼問題。特別是服務器安裝可能會導致問題... –

+0

@UwePlonus,謝謝。我添加了一些信息。你需要哪些細節? –

+0

Web服務器是否對推送有任何限制?默認情況下,推送僅適用於HTTPS,這是否正確配置?很難說出你的設置有什麼問題... –

回答

2

這只是一種猜測,因爲我看你使用nginx的用CGI?

通常在安裝服務器

hgweb.config

或每個庫

.hg/hgrc

爲允許推送

[web] 
allow_push = * 

看一看https://www.mercurial-scm.org/wiki/HgWebDirStepByStep?highlight=%28allow_push%29#Allow_pushing_to_the_repository


在您的本地存儲庫中10 .hg/hgrc您將需要默認路徑和身份驗證詳細信息以執行hg推送。

[paths] 
default = <repo-url> 

[auth] 
devserver.prefix = https://hg.mdpi.com/ 
devserver.username = <your-name> 
devserver.password = <yout-passwd> 

我懷疑汞推https://hg.mdpi.com/會的工作,原因是沒有回購名字吧..

hg push https://hg.mdpi.com/reponame

將是合法的。

+0

你可以在那裏添加一些更多的細節,恐怕我不明白什麼應該是完成。 –

+0

如果你用hgrc在hg repository中輸入hg push,它將不起作用。您必須hg推或編輯hgrc並在路徑下添加默認值,以便存儲庫知道要推送的位置。之後,您必須提供基於http的基本身份驗證的憑據。這也可以在auth中的hgrc中進行配置。希望這可以幫助。 – cinhtau

+0

我試圖從確切的回購網址推,我仍然有同樣的問題。沒有真正改變。我也編輯了/ etc/mercurial中的hgrc文件,但仍然是相同的pb –

相關問題