After running vagrant up
and logging into the box with vagrant ssh
You'll want to edit /vagrant/gitlabhq/config/gitlab.yml
to your dedired settings for your dev environment, as well as change the default user to the vagrant
user as the default git
user does not exist:
# Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
user: vagrant
Add a symlink to gitlab-shell
in your home directory:
ln -s /vagrant/gitlab-shell ~/
Some paths need to be corrected. Here's my diff:
diff --git a/site-cookbooks/gitlab/templates/default/gitlab.yml.erb b/site-cookbooks/gitlab/templates/default/gitlab.yml
index 6e757f0..b42b41b 100644
--- a/site-cookbooks/gitlab/templates/default/gitlab.yml.erb
+++ b/site-cookbooks/gitlab/templates/default/gitlab.yml.erb
@@ -123,7 +123,7 @@ production: &base
## GitLab Shell settings
gitlab_shell:
# REPOS_PATH MUST NOT BE A SYMLINK!!!
- repos_path: /vagrant/repositories/
+ repos_path: /vagrant/gitlabhq/tmp/repositories/
hooks_path: /vagrant/gitlab-shell/hooks/
# Git over HTTP
diff --git a/site-cookbooks/gitlab/templates/default/gitlab_shell.yml.erb b/site-cookbooks/gitlab/templates/default/gitl
index 06eb1c1..6f4ea80 100644
--- a/site-cookbooks/gitlab/templates/default/gitlab_shell.yml.erb
+++ b/site-cookbooks/gitlab/templates/default/gitlab_shell.yml.erb
@@ -5,7 +5,7 @@ user: vagrant
gitlab_url: "http://localhost/"
# Repositories path
-repos_path: "/home/vagrant"
+repos_path: "/vagrant/gitlabhq/tmp/repositories/"
# File used as authorized_keys for gitlab user
auth_file: "/home/vagrant/.ssh/authorized_keys"
Out of the box, there is something messed up with the rvm configuration. If you try to push a repo, you'll get the following error:
$ git push -u origin master
/usr/bin/env: ruby: No such file or directory
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The correction for now is to make sure rvm gets loaded by editing the .bashrc
file and moving the line loading rvm above the line that returns from .bashrc
file when in a non-interactive mode:
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
...(rest of file)
Now you need to get sidekiq and gitlab running!
cd /vagrant/gitlabhq
bundle exec rake sidekiq:start
rvmsudo rails s -p 80