From: Amélia Coutard-Sander <git@ameliathe1st.gay>
Date: Mon, 25 Nov 2024 23:02:47 +0000 (+0100)
Subject: Simple README
X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=ebaa9f197aa1ab890b8a37c6794110ce0a9b4c24;p=git-over-gnunet.git

Simple README
---

diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..8257e3d
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,39 @@
+This set of bash scripts allows one to clone/fetch/pull git repositories using gnunet, specifically the GNS and cadet.
+In the interest of demonstrating that it works, this repo is available at
+	`gnunet://git-over-gnunet.serv.000G0000V4BD1K10PRPGDKR916362AFZ12DBGA378EFRWPB0M54WHGX3YC`.
+	Try cloning it ! (And do tell me if it fails, or if it works.)
+
+Usage:
+Client:
+	You must add the repo folder to the GIT_EXEC_PATH (for example by prepending
+		`GIT_EXEC_PATH=$GIT_EXEC_PATH:<path-to-repo>` before every git command that uses remotes).
+	The URL to give to git is gnunet://<GNS name of the repo>.
+Server:
+	- To run the server on a repo, simply copy the two .sh files to its root, and run
+		`./run-daemons.sh <ego> <repo-name>`.
+	- This will open the repo for pulling on the GNS name `<repo-name>.<ego>`.
+
+Features:
+	- Clone repo !
+	- Fetch repo !
+	- Pull repo !
+
+TODO:
+	- Rewrite in C as a proper gnunet service, should fix the cadet pushing issues.
+		- Specific GNS record type ?
+	- Figure out why cadet breaks when pushing, probably linked to the usage of the CLI client, C rewrite might fix.
+	- In which case, password system to push to repos (just add the password to the port ?)
+	- Pulling from anyone using a commit hash ?
+		- DHT to figure out who has what commits ?
+		- Question of trust for pulling from peers ?
+
+How it works:
+Client:
+	- Uses a git remote helper to give git the ability to interpet the gnunet:// scheme.
+	- Gets the TXT record associated with the GNS name given after the gnunet://.
+	- This TXT record is of the form <peer-id>:<port>.
+	- To run a specific git command and get its inputs and outputs, connect via cadet
+		to the peer id <peer-id>, via the port <port>-<command>.
+	- This is used by the remote helper to run git-upload-pack remotely.
+Server:
+	- The server just loops on a cadet server with inputs and outputs connected to the specified git-command.