views:

92

answers:

2

I currently have a git setup where git is a user on my linux box. /home/git exists and there are several git repositories in /home/git. The git user has a shell of /usr/bin/git-shell. If a user needed access to the repository, I'd just grab their SSH DSA public key and embed it into /home/git/.ssh/authorized_keys and they'd be able to work with the repository.

The problem is now that I need a second repository that needs to support a different set of users. I don't want to create a new account for each repository that I create.

What's the best way of keeping this working with SSH? (the easiest way of all the sharing techniques I've seen that git supports)

+7  A: 

You might consider using gitosis.

Main advantages are:

  • only one ssh user (might be a disadvantage)
  • users identified by SSH keys
  • users and repos created on the fly by using git itself
Marcin Gil
gitosis is a good recommendation. easy setup, works great.
tosh
there is any way to do it using only git? i mean just with user accounts, ssh server and git.
ignatius
@ignatius: sure; if a user can ssh into server he can do anything there - ie. use git ;) You can also share git repo by using git-daemon command.
Marcin Gil
A: 

Beside Gitosis (mentioned in Marcin Gil answer), , which requires Python and setuptools, best known probably from seminal Hosting Git repositories, The Easy (and Secure) Way blog post, and described in Chapter 4.7 of "Pro Git" book, there is also similar Gitolite tool; it is written in Perl, and is quite new.

Jakub Narębski