aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-07-19 01:41:53 +0200
committerLinnea Gräf <nea@nea.moe>2024-07-19 01:41:53 +0200
commite4b9a9b40838777d4d017001fef00e1c57efbb0c (patch)
treed9873f599cb4fd92cd7f71284d6be4df9155a3fe /README.md
downloadfagit-e4b9a9b40838777d4d017001fef00e1c57efbb0c.tar.gz
fagit-e4b9a9b40838777d4d017001fef00e1c57efbb0c.tar.bz2
fagit-e4b9a9b40838777d4d017001fef00e1c57efbb0c.zip
Init
Diffstat (limited to 'README.md')
-rw-r--r--README.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a520e5f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,50 @@
+# faGIT
+
+> Free Association Git
+
+This is a git ssh server that allows for both private and public repositories, as well as most notably for anyone to create forks simply by pushing to a branch named `pr/<somename>`. This branch can only be pushed to again by that same ssh key (or the owner of the repo).
+
+This is the free association in **FA**git, allowing anyone without association to the server to create pull requests, without having to use `git send-mail` (although maybe more people should learn how to use that).
+
+Maybe in the future i will find it in my heart to integrate a `git send-mail` receiver that creates pr branches automatically.
+
+## Installation
+
+### Basic structure
+
+Find a good place for the binary (you can generate one using `cargo build --release`. find yours in `target/`) to be saved. Also find a data directory. You will need to have one toml file for basic config including uber admin keys.
+You will also need a `git` user. You will also need to find a repo storage folder. Here is one possible layout:
+
+// TODO: make all of this say that the config path are hardcoded and important to /etc/fagit/fagit.toml
+```
+/opt/fagit/fagit: binary, owned by root
+/opt/fagit/fagit.toml: config, owned by root
+/opt/fagit/store/: folder containing repositories, owned by the git user
+```
+
+Note that the store folder is owned by the git user, since when actually modifying repos fagit will run as the git user. Note also that the fagit.toml contains only minimal metadata and most of the actual config can be done by pushing to the `meta.git` repo.
+
+### Config file
+
+Here is an example config file:
+
+
+```toml
+[ssh]
+user = "git" # log in with the user git
+
+[paths] # All of these paths need to be absolute
+binary = "/opt/fagit/fagit"
+config = "/opt/fagit/fagit.toml" # Note that the config must have the correct path to itself
+store = "/opt/fagit/store/"
+
+[[operator]] # Note that this admin user does not get any permissions aside from being able to access the meta repo
+key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINg2WYMRKINwbH5UCqqK2qq/qW0gG1NnaALHqEyU4NzM"
+```
+
+### SSH authorization
+
+Edit `/etc/ssh/sshd_config` to include `AuthorizedKeysCommand /opt/fagit/fagit auth /opt/fagit/fagit.toml "%u" "%h" "%t" "%k"`. You might also need to set `AuthorizedKeysCommandUser root`.
+
+
+