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.
You assign the group using the chgrp command. For a new repo it is git init --bare --shared=group myproj where myproj is your repo name, followed by chgrp -R mygroup myproj where mygroup is your group name.
Under your repository name, click Settings. In the "Access" section of the sidebar, click Collaborators & teams. Click Invite a collaborator. In the search field, start typing the name of person you want to invite, then click a name in the list of matches.
Repositories owned by personal accounts have one owner. Ownership permissions can't be shared with another personal account. You can also invite users on GitHub to your repository as collaborators.
Apparently, --shared={all|world|everybody}
is broken in recent Git. Use octal permissions:
git init --shared=0777
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With