Вопрос

I'm deploying Gitorious on an Ubuntu 11.04 machine. Everything works, except pushing.

The client gets this:

$ git push origin master 

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

fatal: The remote end hung up unexpectedly 

And the server shows this in 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 

How can I make pushing work?

Best,

Ruben

Это было полезно?

Решение

It turned out the problem was caused by a faulty gitorious_client_host setting, which I had naively set to localhost.

What happened then in /lib/gitorious/ssh/client.rb:85 was that gitorious tried to fetch the repositories configuration through http://localhost/project/repo, but the nginx server had not been configured to serve the gitorious application from localhost.

Two possible solutions:

  1. Set the gitorious_client_host setting to your public gitorious hostname.
  2. Change your nginx or other server configuration to also serve gitorious from localhost.

However, the second solution could cause trouble with other applications.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top