Adding users!

sudo adduser --disabled-password --gecos "$fullname" $user
sudo adduser $user group1 group2 group3

Groups

  • adm = administrators (via sudoers)
  • wiki = ikiwiki wiki

Setting up lighttp

To get gitweb to work, you need to enable cgi:

sudo lighty-enable-mod alias
sudo lighty-enable-mod cgi
sudo /etc/init.d/lighttpd force-reload

Added to lightpd.conf:

alias.url = ( "/git" => "/usr/lib/cgi-bin/gitweb.cgi" )

Using backports

Don't forget to add debian-backports-keyring.

apt-get -t etch-backports install "package"

Setting up a git repo

Private

  1. First, get the server side ready:
    1. sudo adduser projectname
    2. sudo chmod 770 /home/projectname
    3. sudo chmod g+s /home/projectname
    4. sudo su projectname and cd
    5. GIT_DIR=projectname.git git init --shared
    6. Edit project.git/description to give it a nice description.
    7. sudo chmod 770 projectname.git
    8. sudo chmod g+s projectname.git
    9. Now add all the users you want to this group: sudo adduser username projectname
  2. Now get the local side ready:
    1. In your local place, where you have files, do a git init
    2. Add your local files by git add and git commit
    3. git remote add origin git+ssh://username@embeddedmoose.com/home/projectname
    4. git push origin master
    5. git config branch.master.remote origin
    6. git config branch.master.merge refs/heads/master
  3. Now other folks in the projectname group can git clone it. Careful of the pathname (/home/projectname).

Public

  1. First, get the server side ready:
    1. cd /srv/git
    2. GIT_DIR=projectname.git git init --shared
    3. Edit project.git/description to give it a nice description (for gitweb, especially).
    4. sudo chmod 770 projectname.git
  2. Now get the local side ready:
    1. In your local place, where you have files, do a git init.
    2. Add your local files by git add and git commit
    3. git remote add origin git+ssh://username@embeddedmoose.com/srv/git/projectname
    4. git push origin master
    5. git config branch.master.remote origin
    6. git config branch.master.merge refs/heads/master
  3. Now other folks can git clone username@embeddedmoose.com/srv/git/projectname it.