]> git.ekhem.eu.org Git - server.git/commitdiff
[git] Document server configuration.
authorJakub Czajka <jakub@ekhem.eu.org>
Sun, 6 Nov 2022 15:50:32 +0000 (16:50 +0100)
committerJakub Czajka <jakub@ekhem.eu.org>
Sun, 3 Dec 2023 17:00:57 +0000 (18:00 +0100)
git/README [new file with mode: 0644]

diff --git a/git/README b/git/README
new file mode 100644 (file)
index 0000000..b69e9cb
--- /dev/null
@@ -0,0 +1,30 @@
+git
+===
+
+Create a new user.
+
+```
+$ apt install git
+$ adduser git # <password> <password>
+```
+
+Allow connection only with SSH keys.
+
+```
+$ chmod 400 ${SSH_DIR}/id_rsa*
+$ ssh-copy-id -i ${SSH_DIR}/id_rsa git@<server-ip>
+```
+
+Login with SSH key.
+
+```
+$ ssh -i ${SSH_DIR}/id_rsa git@<server>
+```
+
+Disable login with password.
+
+```
+$ passwd --lock git
+```
+
+Create new bare repository.