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.
Dowload and run GitRoot: wget -O gitroot https://gitroot.dev/gitroot-0.1.0 && ./gitroot -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.
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: git clone ssh://$PSEUDO@127.0.0.1:4545/ -o root && cd root
.
Configure your local git client by running .gitroot/init.sh
, then all is ok you can start adding code, repository or user.
Don’t want to run unknown sh? See manually init client.
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, don’t forget to init your local git config: git clone ssh://127.0.0.1:4545/repo1 && cd repo1 && .gitroot/init.sh
To delete a repository see delete repository
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.
Download some plugins:
wget https://gitroot.dev/ladybug-0.0.1.wasm
wget https://gitroot.dev/silo-0.0.1.wasm
wget https://gitroot.dev/grafter-0.0.1.wasm
wget https://gitroot.dev/apex-0.0.1.wasm
In your root repository edit .gitroot/plugins.yml
and add your first plugin:
1- url: "/plugins/ladybug/ladybug-0.0.1.wasm"
2 crc32: null
3 name: ladybug
4- url: "/plugins/ladybug/silo-0.0.1.wasm"
5 crc32: null
6 name: silo
7- url: "/plugins/ladybug/grafter-0.0.1.wasm"
8 crc32: null
9 name: grafter
10- url: "/plugins/ladybug/apex-0.0.1.wasm"
11 crc32: null
12 name: apex
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 url: "file:///plugins/ladybug/ladybug-0.0.1.wasm"
2 crc32: null
3 name: ladybug
4+ active: false
5+ run:
6+ - path: issues/**/*.md
7+ branch:
8+ - "*"
9+ when:
10+ - add
11+ - mod
12+ write:
13+ git:
14+ - path: issues/**/*.md
15+ can:
16+ - mod
17+ web: []
18+ configuration:
19+ metadata:
20+ - default: autogenerated
21+ mandatory: true
22+ name: id
23+ type: crc16
24+ - default: 50.0
25+ mandatory: true
26+ name: priority
27+ type: int
Want to delete a plugin? See delete 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 url: "file:///plugins/ladybug/ladybug-0.0.1.wasm"
2 crc32: null
3 name: ladybug
4- active: false
5+ active: true
6 run:
7 - path: issues/**/*.md
For more details on plugins rights read the documentation.
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.