Commit 18f83016b15a1ad388ccb85a6e0878e7f5f14527
1 parent
c27105f8
Exists in
master
and in
4 other branches
Fixed persmission issue in doc. Added validation of hooks in gitlab:app:status
Showing
5 changed files
with
55 additions
and
21 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap.scss
app/assets/stylesheets/sections/commits.scss
app/views/errors/gitolite.html.haml
| 1 | 1 | .alert-message.block-message.error |
| 2 | 2 | %h3 Gitolite Error |
| 3 | - %hr | |
| 4 | 3 | %h4 Application cant get access to your gitolite system. |
| 5 | - %ol | |
| 6 | - %li | |
| 7 | - %p | |
| 8 | - Check 'config/gitlab.yml' for correct settings. | |
| 9 | - %li | |
| 10 | - %p | |
| 11 | - Make sure web server user has access to gitolite. | |
| 12 | - %a{:href => "https://github.com/gitlabhq/gitlabhq/wiki/Gitolite"} Setup tutorial | |
| 13 | - %li | |
| 14 | - %p | |
| 15 | - Try: | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | +%h4 Tips for Administrator: | |
| 9 | + | |
| 10 | +%ul | |
| 11 | + %li | |
| 12 | + %p | |
| 13 | + Check git logs in admin area | |
| 14 | + %li | |
| 15 | + %p | |
| 16 | + Check config/gitlab.yml for correct settings. | |
| 17 | + %li | |
| 18 | + %p | |
| 19 | + Diagnostic tool: | |
| 16 | 20 | %pre |
| 17 | - = preserve do | |
| 18 | - sudo chmod -R 770 /home/git/repositories/ | |
| 19 | - sudo chown -R git:git /home/git/repositories/ | |
| 21 | + bundle exec rake gitlab:app:status RAILS_ENV=production | |
| 22 | + %li | |
| 23 | + %p | |
| 24 | + Permissions: | |
| 25 | + %pre | |
| 26 | + = preserve do | |
| 27 | + sudo chmod -R 770 /home/git/repositories/ | |
| 28 | + sudo chown -R git:git /home/git/repositories/ | |
| 29 | + sudo chown gitlab:gitlab /home/git/repositories/**/hooks/post-receive | |
| 30 | + | ... | ... |
doc/installation.md
| ... | ... | @@ -119,6 +119,7 @@ Permissions: |
| 119 | 119 | |
| 120 | 120 | sudo chmod -R g+rwX /home/git/repositories/ |
| 121 | 121 | sudo chown -R git:git /home/git/repositories/ |
| 122 | + sudo chown gitlab:gitlab /home/git/repositories/**/hooks/post-receive | |
| 122 | 123 | |
| 123 | 124 | #### CHECK: Logout & login again to apply git group to your user |
| 124 | 125 | ... | ... |
lib/tasks/gitlab/status.rake
| ... | ... | @@ -2,7 +2,7 @@ namespace :gitlab do |
| 2 | 2 | namespace :app do |
| 3 | 3 | desc "GITLAB | Check gitlab installation status" |
| 4 | 4 | task :status => :environment do |
| 5 | - puts "Starting diagnostic" | |
| 5 | + puts "Starting diagnostic".yellow | |
| 6 | 6 | git_base_path = Gitlab.config.git_base_path |
| 7 | 7 | |
| 8 | 8 | print "config/database.yml............" |
| ... | ... | @@ -56,7 +56,28 @@ namespace :gitlab do |
| 56 | 56 | return |
| 57 | 57 | end |
| 58 | 58 | |
| 59 | - puts "\nFinished" | |
| 59 | + if Project.count > 0 | |
| 60 | + puts "Validating projects repositories:".yellow | |
| 61 | + Project.find_each(:batch_size => 100) do |project| | |
| 62 | + print "#{project.name}....." | |
| 63 | + hook_file = File.join(project.path_to_repo, 'hooks','post-receive') | |
| 64 | + | |
| 65 | + unless File.exists?(hook_file) | |
| 66 | + puts "post-receive file missing".red | |
| 67 | + next | |
| 68 | + end | |
| 69 | + | |
| 70 | + | |
| 71 | + unless File.owned?(hook_file) | |
| 72 | + puts "post-receive file is not owner by gitlab".red | |
| 73 | + next | |
| 74 | + end | |
| 75 | + | |
| 76 | + puts "post-reveice file ok".green | |
| 77 | + end | |
| 78 | + end | |
| 79 | + | |
| 80 | + puts "\nFinished".blue | |
| 60 | 81 | end |
| 61 | 82 | end |
| 62 | 83 | end | ... | ... |