| Install as many python modules as you like – in virtual environments | `python-sipgate-xmlrpc` – Easy to use Python bindings for the Sipgate XML-RPC API |
You can use gitosis to allow people to collaborate on a project via git. Its a utility to allow read and write access based on SSH encryption keys. And you only need to create a single system account, not one for every contributor.
First, install gitosis:
su
apt-get install gitosis
Now you are ready to go with the user account gitosis. But if you want to use the system account git so that the git clone ... URLs are shorter, you have to set up this user on your own:
adduser --system --shell /bin/sh --gecos 'git repository hosting' \
--group --disabled-password --home /home/git git
Now generate an SSH keypair from the user of YOUR local computer:
ssh-keygen -t rsa
then copy id_rsa.pub to the server, to /tmp for example. You can do this via scp ~/.ssh/id_rsa.pub SOME_USER@YOUR_SERVER_HOSTNAME:/tmp.
Now initialize gitosis with the new public key:
su git
cd
gitosis-init < /tmp/id_rsa.pub
Now get the gitosis administration repository on your local computer, change the settings, commit and push them back to the server:
git clone git@YOUR_SERVER_HOSTNAME:gitosis-admin.git
cd gitosis-admin
## Now adjust `gitosis.conf` to your needs.
## The names of members must correspond to the filnames in the subfolder gitosis-admin/keydir.
## Enough for your needs should be the follwing example to add a new group *board* with write-
## access to the repositories *Charta* and *templates* (will create the repos automatically):
cat << EOF >> gitosis.conf
[group board]
members = richard
writable = Charta templates
EOF
## now commit and push back
git add . && git commit && git push
Now you can push any git repository to the remote repositories Charta and templates:
# In any local git repository run:
git remote add origin git@YOUR_SERVER_HOSTNAME:Charta.git
git push origin master
Resources
- Resources included with gitosis:
- README.rst
- config file example.conf
- http://www.isnull.com.ar/2010/03/install-git-server-in-debian-with.html (March 2010)
- http://gebi.supersized.org/archives/4-Installing-gitosis-on-debian.html (March 31. 2008)
- Alternatives
- gitosis-ng has some more features: https://github.com/joemiller/gitosis-ng
- Gitolite is a modern alternative with more granular access control: https://github.com/sitaramc/gitolite#start
- Gitlab – Self Hosted Git Management based on Ruby on Rails & Gitolite
- Proven and feature rich: Redmine
Hey!
Thank you very much – this was the most helpful gitosis tutorial that I could find out there. I was able to set up gitosis in less than 20 minutes with it (despite I expected it to be quite a pain judging from stories of other people). The only thing which remained a little bit unclear to me was, if a group has other effects besides mapping users to repos and what I have to do to add a completely new user.