1

我在 Ubuntu 11.04 机器上部署 Gitorious。一切正常,除了推。

客户得到这个:

$ git push origin master 

== Gitorious: 
========================================================== 
fatal error 
======================================================================== 

fatal: The remote end hung up unexpectedly 

服务器在gitorious_auth.log中显示了这一点:

I, [2012-05-08 18:40:45#7589]  INFO -- : Connection from "12.34.56.78 
50393 22" (admin): git-receive-pack 'test/test.git' 
F, [2012-05-08 18:40:45#7589] FATAL -- : EOFError end of file 
reached: /usr/lib/ruby/1.8/net/protocol.rb:135:in `sysread' 
  /usr/lib/ruby/1.8/net/protocol.rb:135:in `rbuf_fill' 
  /usr/lib/ruby/1.8/timeout.rb:67:in `timeout' 
  /usr/lib/ruby/1.8/timeout.rb:101:in `timeout' 
  /usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill' 
  /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil' 
  /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline' 
  /usr/lib/ruby/1.8/net/http.rb:2028:in `read_status_line' 
  /usr/lib/ruby/1.8/net/http.rb:2017:in `read_new' 
  /usr/lib/ruby/1.8/net/http.rb:1051:in `request' 
  /usr/lib/ruby/1.8/net/http.rb:772:in `get' 
  /var/www/gitorious/script/../lib/gitorious/ssh/client.rb:85:in 
`configuration' 
  /var/www/gitorious/script/../lib/gitorious/ssh/client.rb:59:in 
`real_path' 
  /var/www/gitorious/script/../lib/gitorious/ssh/client.rb:73:in 
`to_git_shell_argument' 
  /usr/bin/gitorious:60 

我怎样才能使推动工作?

最好的,

鲁本

4

1 回答 1

1

原来问题是由错误gitorious_client_host设置引起的,我天真地设置为localhost.

然后发生的事情/lib/gitorious/ssh/client.rb:85是 gitorious 试图通过 获取存储库配置http://localhost/project/repo,但 nginx 服务器尚未配置为从localhost.

两种可能的解决方案

  1. gitorious_client_host设置设置为您的公共 gitorious 主机名。
  2. 将您的 nginx 或其他服务器配置更改为也从localhost.

但是,第二种解决方案可能会导致其他应用程序出现问题。

于 2012-05-20T12:02:26.463 回答