BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
cb6d7e51
Commit
cb6d7e51
authored
Sep 12, 2013
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rescue an error if group doesn't exist
parent
7bf8d22f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
check.rake
lib/tasks/gitlab/check.rake
+4
-2
task_helpers.rake
lib/tasks/gitlab/task_helpers.rake
+4
-0
No files found.
lib/tasks/gitlab/check.rake
View file @
cb6d7e51
...
...
@@ -479,11 +479,13 @@ namespace :gitlab do
return
end
if
File
.
stat
(
repo_base_path
).
uid
==
uid_for
(
gitlab_shell_ssh_user
)
&&
File
.
stat
(
repo_base_path
).
gid
==
gid_for
(
gitlab_shell_owner_group
)
uid
=
uid_for
(
gitlab_shell_ssh_user
)
gid
=
gid_for
(
gitlab_shell_owner_group
)
if
File
.
stat
(
repo_base_path
).
uid
==
uid
&&
File
.
stat
(
repo_base_path
).
gid
==
gid
puts
"yes"
.
green
else
puts
"no"
.
red
puts
" User id for
#{
gitlab_shell_ssh_user
}
:
#{
uid
}
. Groupd id for
#{
gitlab_shell_owner_group
}
:
#{
gid
}
"
.
blue
try_fixing_it
(
"sudo chown -R
#{
gitlab_shell_ssh_user
}
:
#{
gitlab_shell_owner_group
}
#{
repo_base_path
}
"
)
...
...
lib/tasks/gitlab/task_helpers.rake
View file @
cb6d7e51
...
...
@@ -80,7 +80,11 @@ namespace :gitlab do
end
def
gid_for
(
group_name
)
begin
Etc
.
getgrnam
(
group_name
).
gid
rescue
ArgumentError
# no group
"group
#{
group_name
}
doesn't exist"
end
end
def
warn_user_is_not_gitlab
...
...
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