Setting up Gitolite on Linux

This article has the definitive guide for setting up Gitolite on Linux from the source project from Github. I followed it step by step and what do you know, it all worked great.

To add new repos and users, pull down the gitolite-admin project from your newly created gitolite server:

git clone gitolite@your_server:gitolite-admin.git

Edit the conf/gitolite.conf file and follow the examples that are already there:

repo    reponame
        RW+ = username

Add the public key file for the user to the keydir dir (file name matching the username you just added to the gitolite.conf file, and then push back the changes:

git add . 
git commit -m "added new repos and users" 
git push origin master

To add an existing new project into the repo, cd into that project and add a new remote:

git remote add origin gitolite@your_server:project_name.git

where project_name matches a repo name that you added earlier to the gitolite.conf file.

Push it up to the repo:

git push origin master

You’re all set.

Enabling SSL for Apache2 on Ubuntu

Edit /etc/apache2/apache2.conf – add:

LoadModule      ssl_module /usr/lib/apache2/modules/mod_ssl.so

Generate SSL certificates:

https://help.ubuntu.com/8.04/serverguide/C/certificates-and-security.html

Add SSL config and 443 port to a new Virtual Host in apache2.conf – for example:

<VirtualHost *:443>
ServerAdmin your_admin@email.com
DocumentRoot /var/www/your_doc_root
SSLEngine on
SSLOptions +StrictRequire
SSLCertificateFile path/to/server.crt
SSLCertificateKeyFile path/to/server.key
ServerName your.server.name
DirectoryIndex index.php
</VirtualHost>

Add a listen port on 443 to /etc/apache2/ports.conf:

NameVirtualHost *:443