狄烁STEC的试验场

hello earth

导航

gitlab 升级到 5.3 之后不能pull

升级gitlab到5.3之后pull出现下面的错误:

/usr/local/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill': Timeout::Error (Timeout::Error)
from /usr/local/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill'
from /usr/local/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
from /usr/local/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
from /usr/local/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
from /usr/local/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
from /usr/local/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'
from /usr/local/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
from /usr/local/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
from /usr/local/lib/ruby/1.9.1/net/http.rb:1293:in `request'
from /home/git/gitlab-shell/lib/gitlab_net.rb:56:in `block in get'
from /usr/local/lib/ruby/1.9.1/net/http.rb:745:in `start'
from /home/git/gitlab-shell/lib/gitlab_net.rb:56:in `get'
from /home/git/gitlab-shell/lib/gitlab_net.rb:17:in `allowed?'
from /home/git/gitlab-shell/lib/gitlab_shell.rb:51:in `validate_access'
from /home/git/gitlab-shell/lib/gitlab_shell.rb:21:in `exec'
from /home/git/gitlab-shell/bin/gitlab-shell:16:in `<main>'
fatal: Could not read from remote repository.

解决方案:

  1. 以root登录
  2. sudo service gitlab stop
  3. cd /home/git/gitlab
  4. rake gitlab:shell:setup RAILS_ENV=production
  5. 输入yes
  6. chown -R git /home/git/.ssh
  7. chgrp -R git /home/git/.ssh
  8. sudo service gitlab start

参考:http://www.linuxidc.com/Linux/2013-06/86544.htm

rake gitlab:shell:setup RAILS_ENV=production

posted on 2013-06-27 17:15  狄烁STEC  阅读(667)  评论(0编辑  收藏  举报