From b6d8c834ce80e8c0c12137528febaf42275d8a2e Mon Sep 17 00:00:00 2001 From: ktyl Date: Tue, 5 Apr 2022 00:33:35 +0100 Subject: [PATCH] fix some errors in git post --- blogs/unfinished/git/git-server.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/blogs/unfinished/git/git-server.md b/blogs/unfinished/git/git-server.md index 1966abb..db68fb4 100644 --- a/blogs/unfinished/git/git-server.md +++ b/blogs/unfinished/git/git-server.md @@ -2,13 +2,13 @@ on debian, `sudo adduser git` -switch to git user with `sudo su git` +switch to git user with `sudo su -l git` create a `.ssh` dir in the git user's home dir and make it only accessible by the git user ``` -cd ~ && mkdir .ssh -chmod 700 .ssh +mkdir ~/.ssh +chmod 700 ~/.ssh ``` create an `authorized_keys` file in the `.ssh` folder, and make it accessible only by the git user @@ -21,10 +21,10 @@ chmod 600 `.ssh/authorized_keys` create a private/public key pair locally to authenticate a user on a machine to connect to the remote server ``` -ssh-keygen -t dsa +ssh-keygen -t rsa ``` -and finally copy it to the (remote) git user's `.ssh/authorized_keys`, for example using `ssh-copy-id` or giving the public key to the server administrator. +and finally copy it into the (remote) git user's `.ssh/authorized_keys`, for example using `ssh-copy-id` or giving the public key to the server administrator. # creating bare git repositories