These forums are read-only!
Git Repository
  • Hi,

    How can I create a git repository (Ubuntu) and use for my projects with a few users?

    Thanks,

    Peter.
  • The how-to at kernel.org describes how to do it over http, is really good and is easy to follow (even includes special Debian instructions): http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt

    If you prefer SSH, there's this (slightly glib) how-to that I dug up while attempting to troubleshoot an https-related problem I was having: http://blog.commonthread.com/2008/4/14/setting-up-a-git-server

    HTH,
    TOC

    PS: the second link probably bears a lot of resemblance to how they do it over at github.com (based on github's online documentation).
  • I use Apache to serve my Git repos over HTTP via mod_dav. To automate the process of setting up a new repo I wrote this bash script:

    #!/bin/sh
    
    if [ -z $1 ]; then
        echo 'Argument required.'
        exit 1
    fi
    
    REPO_ROOT=/home/demo/git
    REPO=$REPO_ROOT/$1.git
    
    mkdir $REPO
    cd $REPO
    git --bare init --shared=group
    git --bare update-server-info
    sudo chown -R demo:www-data $REPO
    sudo chmod -R ug+rw $REPO
    
    echo Done.
    

    Hope that helps in some way.

  • I run gitosis on my ubuntu slice, since it uses ssh keys it makes it much more secure. it was very easy to do.

    http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way