Search code examples
gitpermissionsfile-permissions

How can I make my local Git repository accessible for multiple users?


I want to create a git repository and allow all users to have access to it. I tried initializing it by:

git init --shared=all 

However when I change the user and do a git status, I get the following error:

fatal: Unable to create '.git/index.lock': Permission denied

Is this supposed to happen? I access the repo on my local file-system and not via SSH.


Solution

  • Apparently, --shared={all|world|everybody} is broken in recent Git. Use octal permissions:

    git init --shared=0777