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# Add an user
8 9In any GitRoot repository you will find users right by branch in `.gitroot/users.yml`1011```yml
12owner:
13branches:
14 - name: main
15users:
16 - pseudo: GitRoot
17avatar: ""18emails:
19 - GitRoot@gitroot.com
20ssh:
21 - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEnkDo30AcFQ5A0I1MgWXbJiYG26es5SHOX+lZlIUD9U
22```2324By default GitRoot has added itself in the `owner` group. That means gitroot is able to touch every files in the `main` branch. To add a user insert their ssh key in this files:
2526```diff
27owner:
28 branches:
29 - name: main
30 users:
31 - pseudo: GitRoot
32 avatar: ""
33 emails:
34 - GitRoot@gitroot.com
35 ssh:
36 - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEnkDo30AcFQ5A0I1MgWXbJiYG26es5SHOX+lZlIUD9U
37+ - pseudo: user
38+ avatar: ""
39+ emails:
40+ - user@gitroot.com
41+ ssh:
42+ - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICjrWwMnCd32Z10ZMEGT8zslAivtsFh0zj1Iss3C5Kt
43```4445Commit your change and push `git add . && git commit -m "add user" && git push`. Then next time `user` will push change to the `main` branch GitRoot will accept their changes.
4647When a user create a new branche GitRoot will automaticaly add him in this file for his branch.