GitRoot

Craft your forge // Build your project // Grow your community freely

Not accepting anonymous contribution

By avoiding rights

If you want to fine-tune who can do what a simple way is to say that all users not registered has no branch in .gitroot/users.yml:

1noAnonymous:
2  branches:
3    - name: "*"
4  users: []

You will need to add each ssh key of your contributors see add an user to do it.

Be sure to have at least one user in main branch to be able to modify it, else no one will be able to modify anything.

If an anonymous user push a new branch to the repository he will have a you can't write in $branchName error.

By avoiding branches

Another way to do that is to set nbmaxbranchesbeforerejectinganonymous=0 in the repository configuration file. The result will the same, no anonymous push but what differ is the error the user will have.

If an anonymous user push a new branch to the repository he will have a anonymous branches not allowed error.