From 18599c174f40c0cdf4453fc1f722be071b09a0ad Mon Sep 17 00:00:00 2001 From: Jakub Czajka Date: Sun, 6 Nov 2022 16:50:32 +0100 Subject: [PATCH] [git] Document server configuration. --- git/README | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 git/README diff --git a/git/README b/git/README new file mode 100644 index 0000000..b69e9cb --- /dev/null +++ b/git/README @@ -0,0 +1,30 @@ +git +=== + +Create a new user. + +``` +$ apt install git +$ adduser git # +``` + +Allow connection only with SSH keys. + +``` +$ chmod 400 ${SSH_DIR}/id_rsa* +$ ssh-copy-id -i ${SSH_DIR}/id_rsa git@ +``` + +Login with SSH key. + +``` +$ ssh -i ${SSH_DIR}/id_rsa git@ +``` + +Disable login with password. + +``` +$ passwd --lock git +``` + +Create new bare repository. -- 2.39.5