Alex
Alex

Reputation: 2335

How to manage different repositories for different users with SSH and Git Server and git user account

I just setup a Git server on ubuntu 12.04 LTS, I have a git system user account with disabled password, then the user's .ssh/authorized_keys is setup for all the users I want to access to my server.

How can I setup different repositories with different users while using the same user (git) ?

like:

/opt/git/repo1.git users with access A,B,C /opt/git/repo2.git users with access B,D,E,F /opt/git/repo3.git users with access G,H,I

The current way people authenticate is through public keys, they all have their keys in /home/git/.ssh/authorized_keys

I wonder how github makes this possible because you always connect to their repos with the git user account.

thanks

Upvotes: 1

Views: 142

Answers (1)

gcbenison
gcbenison

Reputation: 11963

Sounds like you're looking for gitolite. It manages access to a shared repository via ssh keys in about the same way you're describing.

Upvotes: 1

Related Questions