Craft your forge // Build your project // Grow your community freely
1<!--
2SPDX-FileCopyrightText: 2025 Romain Maneschi <romain@gitroot.dev>
3 4SPDX-License-Identifier: CC-BY-SA-4.0
5--> 6 7# Not accepting anonymous contribution
8 9## By avoiding rights
1011If 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`:
1213```yml
14noAnonymous:
15branches:
16 - name: "*"17users: []
18```1920You will need to add each ssh key of your contributors see [add an user](./add_user.md) to do it.
2122> 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.
2324If an anonymous user push a new branch to the repository he will have a `you can't write in $branchName` error.
2526## By avoiding branches
2728Another way to do that is to set `nbmaxbranchesbeforerejectinganonymous=0` in the [repository configuration file](../technicals/repo_configuration.md). The result will the same, no anonymous push but what differ is the error the user will have.
2930If an anonymous user push a new branch to the repository he will have a `anonymous branches not allowed` error.