Mozartos
Mozartos

Reputation: 143

Give access to one git repository for specific user

The challenge is as follows. I have a GIT server with many repositories. My goal is to give access to GIT server for new created user, but set priveleges to access only one repository, not all of them.

Is it possible?

Thanks.

Upvotes: 1

Views: 3487

Answers (2)

phd
phd

Reputation: 95048

git doesn't have builtin authentication, you need additional tools. For SSH the tool is gitolite. You can configure fine-grained access control.

You can also install web-based development environments, see a partial list at Free GIT Server with Web GUI a la BitBucket/GitHub.

Upvotes: 1

e-info128
e-info128

Reputation: 4092

Steps on the server:

  1. Create a new user.
  2. Add group to new user (goup of git path, by example: git-projects)
  3. Add permision for access from new user to repository using chmod g+rx.
  4. Create a new user group for the new access (by example: developers2).
  5. Add new group to new user.
  6. change the group of the git directory to new group created.
  7. Other repositories need different user groups.

You need manage the specific permisions from ssh, user system and file system.

Upvotes: 1

Related Questions