Re: Git Server Repository Security?
- From
Heiko Voigt <hvoigt@hvoigt.net>
- Date
- May 18, 2015, 10:26 UTC
- Message-ID
- <20150518102633.GA15186@book.hvoigt.net>
- In-Reply-To
- <CABQ4iYiWu17H1XhPYebmP27x=R11SKW0P91AW2y9S=r-2c0B1A@mail.gmail.com>
Hi,
On Mon, May 18, 2015 at 11:07:02AM +0100, John McIntyre wrote:
Show 11 quoted lines
> Hi, > I've been asked to set up a git repository for a few projects. So I > have a Linux CentOS server running git. I place the repositories > under /opt and I use the .ssh/authorized_keys of the git user, to > grant access. The user sends me his private key, and I paste it into > the end of the file. > > And now, I realise that there's a problem. If I have /opt/repo1.git > and /opt/repo2.git, then all users can access both repositories. > > Is there a way to prevent this?
If you want a simple tool using ssh-keys have a look at gitolite[1]. It quite simple to setup and with it you can specify all kinds of access rights.
Cheers Heiko
[1] http://gitolite.com/gitolite/index.html