Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-07-26 17:14:34 +0400
committerrandx <dmitriy.zaporozhets@gmail.com>2012-07-26 17:14:34 +0400
commit18f83016b15a1ad388ccb85a6e0878e7f5f14527 (patch)
treeaea1ca182e262ca60b1e76532ed51e109cf8504a
parentc27105f8c3dc8b0baec0d36f339dbfc943ff155b (diff)
Fixed persmission issue in doc. Added validation of hooks in gitlab:app:status
-rw-r--r--app/assets/stylesheets/gitlab_bootstrap.scss4
-rw-r--r--app/assets/stylesheets/sections/commits.scss5
-rw-r--r--app/views/errors/gitolite.html.haml41
-rw-r--r--doc/installation.md1
-rw-r--r--lib/tasks/gitlab/status.rake25
5 files changed, 55 insertions, 21 deletions
diff --git a/app/assets/stylesheets/gitlab_bootstrap.scss b/app/assets/stylesheets/gitlab_bootstrap.scss
index 39e5998305a..29c65b828de 100644
--- a/app/assets/stylesheets/gitlab_bootstrap.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap.scss
@@ -74,10 +74,6 @@ h5 {
font-size:14px;
}
-code {
- background:#FCEEC1;
- color:$style_color;
-}
table {
width:100%;
diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss
index 6052ec3fabb..35c3cffd7f1 100644
--- a/app/assets/stylesheets/sections/commits.scss
+++ b/app/assets/stylesheets/sections/commits.scss
@@ -194,4 +194,9 @@
float:right;
@extend .cgray;
}
+
+ code {
+ background:#FCEEC1;
+ color:$style_color;
+ }
}
diff --git a/app/views/errors/gitolite.html.haml b/app/views/errors/gitolite.html.haml
index ccee757378d..eb09d2141b9 100644
--- a/app/views/errors/gitolite.html.haml
+++ b/app/views/errors/gitolite.html.haml
@@ -1,19 +1,30 @@
.alert-message.block-message.error
%h3 Gitolite Error
- %hr
%h4 Application cant get access to your gitolite system.
- %ol
- %li
- %p
- Check 'config/gitlab.yml' for correct settings.
- %li
- %p
- Make sure web server user has access to gitolite.
- %a{:href => "https://github.com/gitlabhq/gitlabhq/wiki/Gitolite"} Setup tutorial
- %li
- %p
- Try:
+
+
+
+
+%h4 Tips for Administrator:
+
+%ul
+ %li
+ %p
+ Check git logs in admin area
+ %li
+ %p
+ Check config/gitlab.yml for correct settings.
+ %li
+ %p
+ Diagnostic tool:
%pre
- = preserve do
- sudo chmod -R 770 /home/git/repositories/
- sudo chown -R git:git /home/git/repositories/
+ bundle exec rake gitlab:app:status RAILS_ENV=production
+ %li
+ %p
+ Permissions:
+ %pre
+ = preserve do
+ sudo chmod -R 770 /home/git/repositories/
+ sudo chown -R git:git /home/git/repositories/
+ sudo chown gitlab:gitlab /home/git/repositories/**/hooks/post-receive
+
diff --git a/doc/installation.md b/doc/installation.md
index 3dfedfe10ad..cb54663e79e 100644
--- a/doc/installation.md
+++ b/doc/installation.md
@@ -119,6 +119,7 @@ Permissions:
sudo chmod -R g+rwX /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
diff --git a/lib/tasks/gitlab/status.rake b/lib/tasks/gitlab/status.rake
index ac712234b27..96b8886fa89 100644
--- a/lib/tasks/gitlab/status.rake
+++ b/lib/tasks/gitlab/status.rake
@@ -2,7 +2,7 @@ namespace :gitlab do
namespace :app do
desc "GITLAB | Check gitlab installation status"
task :status => :environment do
- puts "Starting diagnostic"
+ puts "Starting diagnostic".yellow
git_base_path = Gitlab.config.git_base_path
print "config/database.yml............"
@@ -56,7 +56,28 @@ namespace :gitlab do
return
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