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
- First, get the server side ready:
sudo adduser projectnamesudo chmod 770 /home/projectnamesudo chmod g+s /home/projectnamesudo su projectnameandcdGIT_DIR=projectname.git git init --shared- Edit
project.git/descriptionto give it a nice description. sudo chmod 770 projectname.gitsudo chmod g+s projectname.git- Now add all the users you want to this group:
sudo adduser username projectname
- Now get the local side ready:
- In your local place, where you have files, do a
git init - Add your local files by
git addandgit commit git remote add origin git+ssh://username@embeddedmoose.com/home/projectnamegit push origin mastergit config branch.master.remote origingit config branch.master.merge refs/heads/master
- In your local place, where you have files, do a
- Now other folks in the projectname group can
git cloneit. Careful of the pathname (/home/projectname).
Public
- First, get the server side ready:
cd /srv/gitGIT_DIR=projectname.git git init --shared- Edit
project.git/descriptionto give it a nice description (for gitweb, especially). sudo chmod 770 projectname.git
- Now get the local side ready:
- In your local place, where you have files, do a
git init. - Add your local files by
git addandgit commit git remote add origin git+ssh://username@embeddedmoose.com/srv/git/projectnamegit push origin mastergit config branch.master.remote origingit config branch.master.merge refs/heads/master
- In your local place, where you have files, do a
- Now other folks can
git clone username@embeddedmoose.com/srv/git/projectnameit.