Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
7a88bf09
Commit
7a88bf09
authored
Feb 11, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gitlab:check
parent
fcfb6d84
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
65 deletions
+1
-65
config/gitlab.yml.example
config/gitlab.yml.example
+1
-1
lib/tasks/gitlab/check.rake
lib/tasks/gitlab/check.rake
+0
-64
No files found.
config/gitlab.yml.example
View file @
7a88bf09
...
@@ -107,7 +107,7 @@ backup:
...
@@ -107,7 +107,7 @@ backup:
gitolite:
gitolite:
# REPOS_PATH MUST NOT BE A SYMLINK!!!
# REPOS_PATH MUST NOT BE A SYMLINK!!!
repos_path: /home/git/repositories/
repos_path: /home/git/repositories/
hooks_path: /home/git/
.gitolite
/hooks/
hooks_path: /home/git/
gitlab-shell
/hooks/
admin_key: gitlab
admin_key: gitlab
upload_pack: true
upload_pack: true
receive_pack: true
receive_pack: true
...
...
lib/tasks/gitlab/check.rake
View file @
7a88bf09
...
@@ -377,10 +377,8 @@ namespace :gitlab do
...
@@ -377,10 +377,8 @@ namespace :gitlab do
check_repo_base_is_not_symlink
check_repo_base_is_not_symlink
check_repo_base_user_and_group
check_repo_base_user_and_group
check_repo_base_permissions
check_repo_base_permissions
check_post_receive_hook_exists
check_post_receive_hook_is_up_to_date
check_post_receive_hook_is_up_to_date
check_repos_post_receive_hooks_is_link
check_repos_post_receive_hooks_is_link
check_repos_git_config
finished_checking
"Gitolite"
finished_checking
"Gitolite"
end
end
...
@@ -389,29 +387,6 @@ namespace :gitlab do
...
@@ -389,29 +387,6 @@ namespace :gitlab do
# Checks
# Checks
########################
########################
def
check_post_receive_hook_exists
print
"post-receive hook exists? ... "
hook_file
=
"post-receive"
gitolite_hooks_path
=
File
.
join
(
Gitlab
.
config
.
gitolite
.
hooks_path
,
"common"
)
gitolite_hook_file
=
File
.
join
(
gitolite_hooks_path
,
hook_file
)
gitolite_ssh_user
=
Gitlab
.
config
.
gitolite
.
ssh_user
gitlab_hook_file
=
Rails
.
root
.
join
.
join
(
"lib"
,
"hooks"
,
hook_file
)
if
File
.
exists?
(
gitolite_hook_file
)
puts
"yes"
.
green
else
puts
"no"
.
red
try_fixing_it
(
"sudo -u
#{
gitolite_ssh_user
}
cp
#{
gitlab_hook_file
}
#{
gitolite_hook_file
}
"
)
for_more_information
(
see_installation_guide_section
"Setup GitLab Hooks"
)
fix_and_rerun
end
end
def
check_post_receive_hook_is_up_to_date
def
check_post_receive_hook_is_up_to_date
print
"post-receive hook up-to-date? ... "
print
"post-receive hook up-to-date? ... "
...
@@ -537,45 +512,6 @@ namespace :gitlab do
...
@@ -537,45 +512,6 @@ namespace :gitlab do
end
end
end
end
def
check_repos_git_config
print
"Git config in repos: ... "
unless
Project
.
count
>
0
puts
"can't check, you have no projects"
.
magenta
return
end
puts
""
options
=
{
"core.sharedRepository"
=>
"0660"
,
}
Project
.
find_each
(
batch_size:
100
)
do
|
project
|
print
"
#{
project
.
name_with_namespace
.
yellow
}
... "
if
project
.
empty_repo?
puts
"repository is empty"
.
magenta
else
correct_options
=
options
.
map
do
|
name
,
value
|
run
(
"git --git-dir=
\"
#{
project
.
repository
.
path_to_repo
}
\"
config --get
#{
name
}
"
).
try
(
:chomp
)
==
value
end
if
correct_options
.
all?
puts
"ok"
.
green
else
puts
"wrong or missing"
.
red
try_fixing_it
(
sudo_gitlab
(
"bundle exec rake gitlab:gitolite:update_repos RAILS_ENV=production"
)
)
for_more_information
(
"doc/raketasks/maintenance.md"
)
fix_and_rerun
end
end
end
end
def
check_repos_post_receive_hooks_is_link
def
check_repos_post_receive_hooks_is_link
print
"post-receive hooks in repos are links: ... "
print
"post-receive hooks in repos are links: ... "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment