Gitorious

Gitorious is a great repository host via Git.

Installation
rm -rf git.example.com git clone git://gitorious.org/gitorious/mainline.git git.example.com cd git.example.com git submodule update --init cp ~/git.example.com/config/database.sample.yml ~/git.example.com/config/database.yml cp ~/git.example.com/config/broker.yml.example ~/git.example.com/config/broker.yml cp ~/git.example.com/config/gitorious.sample.yml ~/git.example.com/config/gitorious.yml production: cookie_secret: # Input something random here. such as "asdadasdasdwefmwoeigjregjweijf30jrftjg45ytjg40ngyt435utfo32mf3h" repository_base_path: "/home/USERNAME/repositories" # This is the location of repositories stored. extra_html_head_data: system_message: gitorious_client_port: 80 # This port is used by "gitorious", which would be called while pushing. Make sure this is the correct port for your web server. On a shared hosting, it should be "80". gitorious_client_host: git.myserver.com # This host name is used by "gitorious", which would be called while pushing. Make sure this is the correct domain for your web server. On a shared hosting, it should be your domain name. gitorious_host: git.myserver.com # Just like "gitorious_client_host", but this field is not used by "gitorious". gitorious_user: git # The shell account username. exception_notification_emails: christianATcjohansen.no mangle_email_addresses: true public_mode: true # Set to false if you want to prevent public access. locale: en archive_cache_dir: "/home/USERNAME/tarballs" # Make sure this directory is existed. archive_work_dir: "/home/USERNAME/tarballs-work" # Same as above only_site_admins_can_create_projects: false hide_http_clone_urls: false is_gitorious_dot_org: false messaging_adapter: sync # IMPORTANT: Make sure this is set to "sync". For you cannot run daemon on a shared hosting, Apache ActiveMQ and "stomp" are both unavailable.
 * Create a new domain with a user with shell access. Remember to choose "Passenger" option. Leave the document path default.
 * Log in that user via ssh
 * If your domain named git.example.com, then run:
 * Run these commands to make the configuration files:
 * Use your favorite text editor to modify ~/git.example.com/config/database.yml and input your database information in "production" section
 * Use your favorite text editor to open ~/git.example.com/config/gitorious.yml . Remove the first line("development") and the third line("test").
 * Configure the "production" section like this:

cd ~ mkdir .ssh chmod 700 .ssh cd .ssh touch authorized_keys chmod 600 authorized_keys
 * Create a directory named ".ssh" under your home directory and change it permission to 700. Create "authorized_keys" under it and set its permission to 600:

export PATH=$PATH:$HOME/git.example.com/script export RAILS_ENV=production cd ~/git.example.com gem install bundler bundle install --path vendor/bundle rake db:migrate RAILS_ENV=production ruby1.8 script/create_admin rm ~/git.example.com/public/javascripts/all.js ; rm ~/git.example.com/public/stylesheets/all.css ; touch ~/git.example.com/tmp/restart.txt
 * Add these lines to your bash configuration files(~/.bashrc and ~/.bash_profile):
 * Run "source ~/.bashrc" or log out and in to make your bash profile run.
 * Run these command to initialize your Gitorious:
 * Access http://git.example.com/, everything should work well.
 * To restart the instance (such as after making any configuration changes or updating the sources), run:
 * NOTE: all.js and all.css are rebuilt on demand. They will not be rebuilt if they exist, so should be removed for most source updates via the command above.

Troubleshooting
Dreamhost's "procwatch" may kill your "ruby1.8" when you execute "rake db:migrate". You can contact support to help you run this command or just install Gitorious on your desktop computer and export the database.

If installing on a VPS, you may have to temporarily increase you server memory allowance to execute "bundle install"

If you don't have https (secure server) installed on your server you have to append the following to the file ~/git.example.com/config/environments/production.rb SslRequirement.disable_ssl_check = true