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
Boxiang Sun
gitlab-ce
Commits
19f7b038
Commit
19f7b038
authored
Jul 27, 2012
by
Michael van Rooijen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-receive hook should be owned by gitlab user, not git.
parent
0590aa9d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lib/tasks/gitlab/backup.rake
lib/tasks/gitlab/backup.rake
+6
-2
No files found.
lib/tasks/gitlab/backup.rake
View file @
19f7b038
...
@@ -142,8 +142,12 @@ namespace :gitlab do
...
@@ -142,8 +142,12 @@ namespace :gitlab do
print
"- Restoring repository
#{
project
.
first
}
... "
print
"- Restoring repository
#{
project
.
first
}
... "
FileUtils
.
rm_rf
(
project
.
second
)
if
File
.
dirname
(
project
.
second
)
# delet old stuff
FileUtils
.
rm_rf
(
project
.
second
)
if
File
.
dirname
(
project
.
second
)
# delet old stuff
if
Kernel
.
system
(
"cd
#{
File
.
dirname
(
project
.
second
)
}
> /dev/null 2>&1 && git clone --bare
#{
backup_path_repo
}
/
#{
project
.
first
}
.bundle
#{
project
.
first
}
.git > /dev/null 2>&1"
)
if
Kernel
.
system
(
"cd
#{
File
.
dirname
(
project
.
second
)
}
> /dev/null 2>&1 && git clone --bare
#{
backup_path_repo
}
/
#{
project
.
first
}
.bundle
#{
project
.
first
}
.git > /dev/null 2>&1"
)
Kernel
.
system
(
"sudo chmod -R g+rwX
#{
Gitlab
.
config
.
git_base_path
}
"
)
permission_commands
=
[
Kernel
.
system
(
"sudo chown -R
#{
Gitlab
.
config
.
ssh_user
}
:
#{
Gitlab
.
config
.
ssh_user
}
#{
Gitlab
.
config
.
git_base_path
}
"
)
"sudo chmod -R g+rwX
#{
Gitlab
.
config
.
git_base_path
}
"
,
"sudo chown -R
#{
Gitlab
.
config
.
ssh_user
}
:
#{
Gitlab
.
config
.
ssh_user
}
#{
Gitlab
.
config
.
git_base_path
}
"
,
"sudo chown gitlab:gitlab /home/git/repositories/**/hooks/post-receive"
]
permission_commands
.
each
{
|
command
|
Kernel
.
system
(
command
)
}
puts
"[DONE]"
.
green
puts
"[DONE]"
.
green
else
else
puts
"[FAILED]"
.
red
puts
"[FAILED]"
.
red
...
...
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