fix some errors in git post
This commit is contained in:
parent
be403db358
commit
b6d8c834ce
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue