3

我正在尝试在 10.8.2 服务器上安装 Gitlab,但是当我执行时

bundle exec rake gitlab:check RAILS_ENV=production

我收到以下错误。

Checking Environment ...

gitlab user is in gitg group? ... yes
Has no "-e" in ~gitolite/.profile ... yes
Git configured for gitlab user? ... yes
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

** Invoke gitlab:gitolite:check (first_time)
** Invoke environment 
** Execute gitlab:gitolite:check
Checking Gitolite ...

Using recommended version ... no
  Try fixing it:
  We strongly recommend using the version pointed out in the installation guide.
  For more information see:
  doc/install/installation.md in section "Gitolite"
Repo umask is 0007 in .gitolite.rc? ... yes
Allow all Git config keys in .gitolite.rc ... yes
Config directory exists? ... yes
Config directory owned by gitolite:gitg ... rake aborted!
undefined method `split' for nil:NilClass
/Users/gitlab/Opt/rails/gitlabhq/lib/tasks/gitlab/task_helpers.rake:81:in `gid_for'
/Users/gitlab/Opt/rails/gitlabhq/lib/tasks/gitlab/check.rake:533:in `check_dot_gitolite_user_and_group'
/Users/gitlab/Opt/rails/gitlabhq/lib/tasks/gitlab/check.rake:400:in `block (3 levels) in <top (required)>'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/gitlab/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:187:in `block in invoke_prerequisites'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:185:in `each'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:185:in `invoke_prerequisites'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:165:in `block in invoke_with_call_chain'
/Users/gitlab/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/bin/rake:19:in `load'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374@global/bin/rake:19:in `<main>'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `eval'
/Users/gitlab/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `<main>'

我确实检查了权限一千次,如果有人能给我关于这个问题的提示,那就太好了。

4

1 回答 1

2

这似乎是一个正在进行的问题:请参阅Issue 2890

提交 e0d62d9c可能会解决此问题,在lib/tasks/gitlab/task_helpers.rake.

   def gid_for(group_name)
-    group_line = File.read("/etc/group").lines.select{|l| l.start_with?("#{group_name}:")}.first
-    group_line.split(":")[2].to_i
+    Etc.getgrnam(group_name).gid
   end
于 2013-02-06T16:52:01.023 回答