doc: describe GIT_AUTH_ID, create README.md from manual page.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..86ef437
--- /dev/null
+++ b/README.md
@@ -0,0 +1,31 @@
+# GIT-AUTH
+
+## Synopsis
+
+ GIT_AUTH_ID=ID git-auth COMMAND [ARGS ...]</td>
+
+## Description
+
+**git-auth** starts by reading rules from /etc/git-auth.conf, one rule
+per line. Empty lines and lines starting with # are ignored. Each rule
+is made of tokens separated by one or more spaces.
+
+**git-auth** executes COMMAND and ARGS using execvp if the requested ID,
+COMMAND and ARGS match any of the rules defined in /etc/git-auth.conf.
+
+**git-auth** matches a rule by matching all the rule's tokens with ID,
+COMMAND and ARGS in order. Comparison is case sensitive.
+
+A wildcard token "*" matches any string.
+
+## Environment
+
+ * **GIT_AUTH_ID** an arbitrary token to match with the rules.
+This is usually set for each public key in /home/git/.ssh/authorized_keys
+with
+ environment="GIT_AUTH_ID=..." ssh-rsa ...
+
+## Files
+
+ * /etc/git-auth.conf
+ * /home/git/.ssh/authorized_keys
diff --git a/git-auth.1 b/git-auth.1
index 25af440..1a59aec 100644
--- a/git-auth.1
+++ b/git-auth.1
@@ -21,9 +21,12 @@ matches a rule by matching all the rule's tokens with
ID, COMMAND and ARGS in order. Comparison is case sensitive.
A wildcard token "*" matches any string.
-
.Sh ENVIRONMENT
-GIT_AUTH_ID
+GIT_AUTH_ID :
+an arbitrary token to match with the rules.
+This is usually set for each public key in /home/git/.ssh/authorized_keys
+with
+.Nm environment="GIT_AUTH_ID=..."
.Sh FILES
/etc/git-auth.conf