fix some errors in git post

This commit is contained in:
ktyl 2022-04-05 00:33:35 +01:00
parent be403db358
commit b6d8c834ce
1 changed files with 5 additions and 5 deletions

View File

@ -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