How to prevent users from deleting commit from remote git repository
I have a git remote repository setup on a shared hosting service with access to git over https. I want to prevent some or all developers from deleting commits from remote repository. How can I achieve this?
- Gitolite access repair
- Is there a reason why you shouldn't mix ssh and smart http access with git?
- Can GitoLite and Git Using LDAP and NOT SSH keys
- Git hook to detect file changes that contain a certain string
- why my git can't push to my server by gitolite use git-daemon
- Assigning global access rule for a directory's sub-repositories with gitolite
One Solution collect form web for “How to prevent users from deleting commit from remote git repository”
With gitolite specifically, you have different types of permissions.
They include a ‘D’ for deletion:
repo @all RWCD dummy-branch = foo
That will authorize the deletion of a branch
dummy-branch, but that will also make all your existing
RW+ rule deny deletion (because they don’t have a ‘
If a rule specifies
RW+D, then rules that do NOT have the
Dqualifier will no longer permit deleting a ref.
In that case, you specify who has the right to delete, the others, by default, won’t have that right.