git/README.md

67 lines
815 B
Markdown

# Git Config
## Git
### Install && Config
```sh
sudo apt update
sudo apt install git
```
```sh
sudo adduser \
--system \
--shell /bin/bash \
--gecos "Git Version Control" \
--group \
--disabled-password \
--home /home/git \
git
```
## SSH
### Install && Config
#### Linux
install
```sh
sudo apt update
sudo apt install git
sudo apt install openssh-client
```
config
```sh
ssh-keygen -t ed25519 -C "name@ssh.local"
```
copy and paste
```sh
cat ~/.ssh/id_ed25519.pub
```
copy to server
```sh
ssh-copy-id -p 22 root@<ip>
```
## Error`s
### SSH key
```
Cloning into '<repo>'...
repo@repo.local: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```
```
cat ~/.ssh/id_ed25519.pub
```