top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Git users and its permissions

+1 vote

I created a repo on a server, and followed instructions to make a new git group, and assign users to the group .. then I set it so the shell is git shell, and the users can only access the files through git .. this is great .. now, can I create a user that can only pull?

posted Jul 16, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

There's no way to do implement this using plain Git.

Either look at specialized server-side front-ends like gitolite [ ] or at turn-key Git hosting solutions like [ ] or [ ].

answer Jul 16, 2013 by anonymous
If a user can only *read* the files in the Git repository, what can the user do with the repostiory using Git?
Similar Questions
+1 vote

Recently I had to write some automation scripts and I found that git reset --hard actually restores each file's permissions.

That is causing both the created and the last-modified dates of the file to get changed to the time of the git reset.

This behavior is easy to demonstrate:

echo "test" > myfile
chmod 777 myfile

git add myfile && git commit -m "Test" & the only solution I'm able to think about is actually restoring the permissions of each file to the ones git thinks they should have before doing the git reset.

Maybe I'm wrong and there is a way for doing what I want, if so, please correct me. But if there isn't, should this be implemented? Are there any reasons for not doing it?

+1 vote

I want to use Git in a project but only some developers can Access in some folders (not all folders of the Project). Can Git limits the access to folders to users? How?

An example:
Project p_example
Users: A, B and C

Only B and C can access into scripts, src and docs folders but A only can access into scripts folder.

+1 vote

How to configure a read-only copy of a remote Git repository on a local server in bare mode and automatically synchronize its contents.

I need to configure a mirror of the repository hosted at another location and the mirrored repository should automatically perform syncing of code at regular intervals.