Gitlab Install


Installing Ruby


Ruby gem will thrown an error each time it runs that it wasn't compiled with libyaml. The following links fixed this issue:

Active Directory Configuration

  enabled: true
  host: ''
  base: 'CN=users,DC=gemini,DC=edu'
  port: 3268
  uid: 'sAMAccountName'
  method: 'plain' # plain
  bind_dn: 'CN=srv_webuser,OU=Service Accounts,DC=gemini,DC=edu'
  password: 'Heres14u'

MySQL Configuration

We need to modify the database config to use our external MySQL server as we don't plan on running a local MySQL.

vi /home/gitlab/gitlab/config/database/yml

  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: gitlab
  pool: 5
  username: gitlab
  password: "gitlabhq"

Post receive File Fix

Make sure that the path to the post receive hooks for gitolite is readable by the gitolite user:


Gitolite Configuration

Nginx Proxy

We need to use a reverse proxy because gitlab is running on port 3000.

Here's the nginx config in `/etc/nginx/conf.d/gitlab.conf`:

upstream gitlab {

server {
  listen;         # e.g., listen;
  server_name;     # e.g., server_name;
  root /home/gitlab/gitlab/public;

  # individual nginx logs for this gitlab vhost
  access_log  /var/log/nginx/gitlab_access.log;
  error_log   /var/log/nginx/gitlab_error.log;

## send request back to apache1 ##
    location / {
     proxy_pass  http://gitlab;
     proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
     proxy_redirect off;
     proxy_buffering off;
     proxy_set_header        Host            $host;
     proxy_set_header        X-Real-IP       $remote_addr;
     proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;



gitlab can't connect to gitolite

Try updating the gitolite keys


The bundle my give timeout errors. This may be related to the redis server not running.

A few things to try:

  • /etc/init.d/redis status
  • read the redis log: /var/log/redis/redis.log
  • delete the default redis database: /var/lib/redis/dump.rdp

ssh key redundancy

If you remove and add users with duplicate ssh keys, gitolite may still have a copy cached which will prevent the either user ssh git access.

To test this, ssh as ``. The output will show you which repos you have permissions for. If you see any errors, remove the ssh key for the redundant user:

 vi /home/git/.ssh/authorized_keys 

If gitolite is still adding the old user, clone the gitolite-admin repo and remove the user's key manually:


Installing Gitlab 4

Installing Gitlab 3