服务器生成一个SSH密钥
ssh-keygen -t rsa -b 4096 -C "1289770378@qq.com"
获取 SSH key
cat ~/.ssh/id_rsa.pub
github 添加SSHkeys
Setting
-> SSH and GPG keys
-> New SSH key
随便起个名字,将上面获取的key粘贴进去,Add SSH key
添加key。
返回服务器
root@VM-0-4-ubuntu:~/data/docker_data/memos# git clone git@github.com:Rabithua/memoNode.git
Cloning into 'memoNode'...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 16 (delta 6), reused 14 (delta 4), pack-reused 0
Receiving objects: 100% (16/16), 34.70 KiB | 212.00 KiB/s, done.
Resolving deltas: 100% (6/6), done.