The URL to give to git is gnunet://<location of the repo>/<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> <gns-name> <repo-name>`.
- - This will open the repo for pulling on the url `gnunet://<gns-name>.<ego>/<repo-name>`.
+ `./run-daemons.sh <repo-name>`.
+ - You should also add a gns TXT record containing the peerid serving your repos to your zone.
+ - This will open the repo for pulling on the url `gnunet://<gns-record-name>/<repo-name>`.
Features:
- Clone repo !
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://<gns-name>/<repo-name>.
+ - Gets the TXT record associated with the GNS name given in gnunet://<gns-name>/<repo-name>.
- This TXT record is a <peer-id>.
- To run a specific git command on repo <repo> and get its inputs and outputs, connect via cadet
to the peer id <peer-id>, via the port git.<repo-name>-<command>.
#!/usr/bin/env bash
-if test -z $1 || test -z $2 || test -z $3 || ! test -z $4; then
- echo >&2 "Usage: $0 <ego> <name> <repo-name>"
+if test -z $1 || ! test -z $2; then
+ echo >&2 "Usage: $0 <repo-name>"
exit 1
fi
-ego="$1"
-name="$2"
-repo_name="$3"
+name="$1"
-echo >&2 "Running pullable repo $repo_name as \`$name.$ego'."
-gnunet-namestore -a -t TXT -e 1d -n "$name" -V "$(gnunet-core -i | sed 's/.*: //')" -z "$ego" -p
+echo >&2 "Running pullable repo $name."
-./daemon.sh upload-pack "$repo_name"
+./daemon.sh upload-pack "$name"
-gnunet-namestore -d -n "$name" -z "$ego"
-echo >&2 "Terminating pullable repo $repo_name in ego $ego."
+echo >&2 "Terminating pullable repo $name."