User Tools

Site Tools


Git: create your own git server, but every repository is private


In this tutorial I will show how to create a remote git server but keeping the repositories private, i.e. only the members of the repository can commit or query it, the rest of the users of other repositories can checkout that repository.

To achieve this goal, we will create a user in the server per repository. Let's say that we have to create two repositories: repo1 and repo2. Then we will have to create two users, and create different directories to hold the repositories for each of them. After that, we will have to add the public keys of the remote users to the .ssh/authorized_keys to enable the commits to that users.

linux/gitserverprivate.txt · Last modified: 2023/03/04 15:01 by rlunaro