git_local is intended to provide a browser based way of creating and viewing your local git repositories.
it’s basically an excuse to play with grit and sinatra, and it’s not quite as useless as it was yesterday…
- sinatra
- ftools
- RedCloth
- grit
- mime-types
- haml 2.x
- open4
- passenger (optional)
- pygments http://pygments.org
- run the setup utility
# from the git_local directory run...
rake setup
# ...and follow the prompts.
git_local will first check for a few dependencies, and attempt to install
them if they are not available. After that, you will be prompted to set up
Basic HTTP Authentication. git_local uses Rack, so if you plan to run
git_local on a server that supports Rack middleware, you have the option
to enable and configure Basic HTTP Authentication. If you’re not using Rack,
just answer ‘no’ when prompted to setup HTTP Authentication
- start the server:
ruby git_local.rb
git_local runs on Sinatra, and Sinatra makes deploying with Phusion Passenger a cinch. If you haven’t already, run
sudo gem install passenger
when that’s done, run
sudo passenger-install-apache2-module
and follow the instructions to get passenger running on your machine. If you already ran the git_local setup task and elected to enable Basic HTTP Authentication, then your Rack configuration is already taken care of. Simply add the virtual host to your apache2 config, and restart apache.
Your vhost should look something like this:
<VirtualHost 192.168.1.199:80>
ServerName your.server.name
DocumentRoot /path/to/your/git_local/public
RackBaseURI /
<Directory /your/home/directory>
allow from all
</Directory
</VirtualHost>
That’s it! Now all you need to do is bounce apache, and you’re ready to rock!
If you need to restart git_local you can run the restart rake task with:
rake restart