#### Install gems
- # mysql
- sudo -u gitlab -H bundle install --without development test sqlite postgres --deployment
-
- # or postgres
- sudo -u gitlab -H bundle install --without development test sqlite mysql --deployment
+ cd /home/gitlab/gitlab
- # or sqlite
- sudo -u gitlab -H bundle install --without development test mysql postgres --deployment
+ sudo gem install charlock_holmes --version '0.6.9'
+ sudo gem install bundler
+ sudo -u gitlab -H bundle install --without development test sqlite postgres --deployment
- #### Setup database
+#### Configure git client
+
+Gitlab needs to be able to commit and push changes to gitolite.
+Git requires a username and email in order to be able to do that.
+
+ sudo -u gitlab -H git config --global user.email "gitlab@localhost"
+ sudo -u gitlab -H git config --global user.name "Gitlab"
+
+ #### Setup application
sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production
return
end
+ begin
+ Dir.chdir("/tmp/gitolite_gitlab_test") do
+ `touch blah && git add blah && git commit -qm blah -- blah`
+ raise unless $?.success?
+ end
+ print "Can git commit?............"
+ puts "YES".green
+ rescue
+ print "Can git commit?............"
+ puts "NO".red
+ return
+ ensure
+ FileUtils.rm_rf("/tmp/gitolite_gitlab_test")
+ end
+
print "UMASK for .gitolite.rc is 0007? ............"
- if open("#{git_base_path}/../.gitolite.rc").grep(/UMASK([ \t]*)=([ \t>]*)0007/).any?
+ if open(File.absolute_path("#{git_base_path}/../.gitolite.rc")).grep(/UMASK([ \t]*)=([ \t>]*)0007/).any?
puts "YES".green
else
puts "NO".red