From zero to hero
You are intriged by GitRoot, but want to try it before deploye one instance? In this tutorial I propose to you to launch a local instance on your post. Linux users you are welcome, Mac one should work but never tested, Windows user sorry but this will not work.
Download and run
Dowload: wget -O gitroot https://gitroot.dev/releases/gitroot-last && chmod +x gitroot. Warning: gitroot-last is for linux-amd64, others arch/cpu can be found in versions page.
Initialisation: ./gitroot --initConfig ./conf.yml. You can review the file conf.yml, but for now default configuration should be good.
Run: ./gitroot -config="./conf.yml" -data="./data".
GitRoot will create a directory data where you launch it. All its data will be stocked here. By default GitRoot listen to port 4545 for ssh and 4546 for http.
Reminber to delete the
./conf.ymlfile, after the first launch all configurations are stored in the root repository.
Clone root repository
In GitRoot all is stored in git. Even the repositories hosted on your instance. You need to clone the root repository to discover repositories or to add a new one (replace admin with the pseudo you want to use): $PSEUDO=admin git clone ssh://$PSEUDO@127.0.0.1:4545/ root && cd root.
Create your first repository
In the root repository open .gitroot/repositories.yml and add:
1 root:
2 kind: normal
3 defaultbranch: main
4+ repo1:
5+ defaultbranch: main
Commit and push, GitRoot will build your new repo: git add . && git commit -m "add repo1 repository" && git push.
By default GitRoot use main has defaultBranch but you can put every name you like.
You can clone and use your new repository: git clone ssh://127.0.0.1:4545/repo1
To delete a repository see delete repository
Install plugin
GitRoot by itself don’t do so much, but when you add some plugins it start to be a full forge.
Before using a plugin in your repo, instance forge need to install it.
In your root repository edit .gitroot/plugins.yml and add your first plugin:
1- purl: pkg:gitroot/$scope/$name@$version?checksum=$checksum®istry=$url
Find plugin PURLs and more on the gitroot registry.
Git commit and push: git add . && git commit -m "add lot of plugins" && git push
GitRoot add all default configuration requiered for this plugin but not active it.
After a git pull you will see that GitRoot had added a commit in your root repository and in all repositories of your forge.
1 purl: pkg:gitroot/$scope/$name@$version?checksum=$checksum®istry=$url
2+ name: plugin
3+ active: false
4+ run:
5+ - path: issues/**/*.md
6+ branch:
7+ - "*"
8+ when:
9+ - add
10+ - mod
11+ write:
12+ git:
13+ - path: issues/**/*.md
14+ can:
15+ - mod
16+ web: []
17+ configuration:
18+ metadata:
19+ - default: autogenerated
20+ mandatory: true
21+ name: id
22+ type: crc16
23+ - default: 50.0
24+ mandatory: true
25+ name: priority
26+ type: int
Want to delete a plugin? See delete a plugin
Use a plugin
In any repository with plugin installed you can turn active: false to active: true in the .gitroot/plugins.yml. Don’t forget to look/edit default configuration.
1 purl: pkg:gitroot/$scope/$name@$version?checksum=$checksum®istry=$url
2- active: false
3+ active: true
4 run:
5 - path: issues/**/*.md
For more details on plugins rights read the documentation.
Configure an executor
If you want more than what the plugin ecosystem can provide, configure an executor and use all the tools you want.
Play with your forge
Congratulation you have a full forge on your desktop! You can start developping something fun.
You can customize the web representation of your repository. Or you can use some plugins.
But this is on your computer, you can’t invite friends to play with you. For that you need to use an instance available on the web follow deploy an instance to do that.
Or find a provider and use it.
But in any case enjoy your life.