Home

Advertisement

Customize
w0uter88
23 October 2008 @ 12:32 am
Git  
Tried to set up an Version Control System for fun. I picked git since it seems to be the hype to use git.

"Git is an open source version control system designed to handle very large projects with speed and efficiency, but just as well suited for small personal repositories; it is especially popular in the open source community, serving as a development platform for projects like the Linux Kernel, Ruby on Rails, WINE or X.org."

However "Git has been criticized for its usability, documentation, and design."

So it took me an evening of reading before i figured out its basic functions. :/
After messing around with it till i got it i went to bed. ;)

The next day i had to think about my setup, i could run a daemon on a port to handle git stuff.
This would mean i had another process running on my server all the time and opening a port in my router.
So i didn't really like that. Git also allowed doing it over ssh, but i don't want to hand out ssh accounts if someone would like to check my code out. Luckily git also allowed pulling over http.

I ended up having a setup like this

a web interface so people can see what changed with diff's and at what time etc: http://24.132.114.237/git/web/?p=hello.git

so people can clone my project with git instead of having to download a tarball from the webinterface: http://24.132.114.237/git/rep/hello.git/

When i want to push changes onto the server i use: git push ssh://user@24.132.114.237:443/home/user/git/hello.git master


This way i know only I can change my project and i know i can always push securely even when the connection I'm using cant be trusted. And ofcourse, people can view my projects and get the code. :)

Getting gitweb running was a task on its own. All examples for it used either vhosts, some other messy setup or apache. I dont want any of those since i only have one ip, want a clean setup and use lighttpd. :p

After reading up on lighttpd.conf syntax and mod_cgi i came up with this:
$ ls -l /var/www/git/web/
total 16
-rw-r--r-- 1 root root  164 2008-04-08 19:01 git-favicon.png
-rw-r--r-- 1 root root  208 2008-04-08 19:01 git-logo.png
lrwxrwxrwx 1 root root   27 2008-10-22 23:14 gitweb.cgi -> /usr/lib/cgi-bin/gitweb.cgi
-rw-r--r-- 1 root root 7112 2008-04-08 19:01 gitweb.css
$ tail /etc/lighttpd/lighttpd.conf 
$HTTP["url"] =~ "^/git/web" {
  index-file.names = ( "gitweb.cgi" )
  cgi.assign = ( "gitweb.cgi" => "" )
}
Tags:
 
 
 
 

Advertisement

Customize