Fixed persmission issue in doc. Added validation of hooks in gitlab:app:status

This commit is contained in:
randx 2012-07-26 16:14:34 +03:00
parent c27105f8c3
commit 18f83016b1
5 changed files with 55 additions and 21 deletions

View file

@ -74,10 +74,6 @@ h5 {
font-size:14px; font-size:14px;
} }
code {
background:#FCEEC1;
color:$style_color;
}
table { table {
width:100%; width:100%;

View file

@ -194,4 +194,9 @@
float:right; float:right;
@extend .cgray; @extend .cgray;
} }
code {
background:#FCEEC1;
color:$style_color;
}
} }

View file

@ -1,19 +1,30 @@
.alert-message.block-message.error .alert-message.block-message.error
%h3 Gitolite Error %h3 Gitolite Error
%hr
%h4 Application cant get access to your gitolite system. %h4 Application cant get access to your gitolite system.
%ol
%h4 Tips for Administrator:
%ul
%li %li
%p %p
Check 'config/gitlab.yml' for correct settings. Check git logs in admin area
%li %li
%p %p
Make sure web server user has access to gitolite. Check config/gitlab.yml for correct settings.
%a{:href => "https://github.com/gitlabhq/gitlabhq/wiki/Gitolite"} Setup tutorial
%li %li
%p %p
Try: Diagnostic tool:
%pre
bundle exec rake gitlab:app:status RAILS_ENV=production
%li
%p
Permissions:
%pre %pre
= preserve do = preserve do
sudo chmod -R 770 /home/git/repositories/ sudo chmod -R 770 /home/git/repositories/
sudo chown -R git:git /home/git/repositories/ sudo chown -R git:git /home/git/repositories/
sudo chown gitlab:gitlab /home/git/repositories/**/hooks/post-receive

View file

@ -119,6 +119,7 @@ Permissions:
sudo chmod -R g+rwX /home/git/repositories/ sudo chmod -R g+rwX /home/git/repositories/
sudo chown -R git:git /home/git/repositories/ sudo chown -R git:git /home/git/repositories/
sudo chown gitlab:gitlab /home/git/repositories/**/hooks/post-receive
#### CHECK: Logout & login again to apply git group to your user #### CHECK: Logout & login again to apply git group to your user

View file

@ -2,7 +2,7 @@ namespace :gitlab do
namespace :app do namespace :app do
desc "GITLAB | Check gitlab installation status" desc "GITLAB | Check gitlab installation status"
task :status => :environment do task :status => :environment do
puts "Starting diagnostic" puts "Starting diagnostic".yellow
git_base_path = Gitlab.config.git_base_path git_base_path = Gitlab.config.git_base_path
print "config/database.yml............" print "config/database.yml............"
@ -56,7 +56,28 @@ namespace :gitlab do
return return
end end
puts "\nFinished" if Project.count > 0
puts "Validating projects repositories:".yellow
Project.find_each(:batch_size => 100) do |project|
print "#{project.name}....."
hook_file = File.join(project.path_to_repo, 'hooks','post-receive')
unless File.exists?(hook_file)
puts "post-receive file missing".red
next
end
unless File.owned?(hook_file)
puts "post-receive file is not owner by gitlab".red
next
end
puts "post-reveice file ok".green
end
end
puts "\nFinished".blue
end end
end end
end end