Git itself is all about collaboration in an open source environment (cf 

So any restrictions on access need to be implemented elsewhere, rather than 
Git itself.

Access control is a big subject riddled with admin, political and corporate 
issues. In that sense, Git repos are 'just another file / directory' ;-)

On Monday, July 24, 2023 at 8:58:49 AM UTC+1 wrote:

> Hello,
> I am new to the implementation of git and i had a requirement where i need 
> to control user access to specific git repositories. 
> For ex: I have 3 different projects for which i create 3 different git 
> repositories and grant access permissions to specific users based on the 
> projects they are working. I have tried the following way but all the users 
> created on Linux server are able to access all the repositories created 
> under each user. It is not getting restricted to specific Linux User.
>    1. Create three Linux users, one for each repository:  Proejct1, 
>    Project2, and Project 3
>    2. Login into each user and create the bare Git repository
>    3. For each user, create ~/.ssh/authorized_keys 
>     (/home/Project1/.ssh/authorized_keys) and add the public SSH key for each 
>    user that should have access 
> I am not sure what needs to be done to provide access to the user for the 
> git repository created under his user and do not allow other users to 
> access the Git repository created under another user
> Please suggest me the list of steps that needs to be implement to control 
> access to specific Git repositories or any git commands that needs to be 
> executed for this implementation?

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To view this discussion on the web visit

Reply via email to