netnr/ git-ssh.sh 2021-08-15 06:50
git clone ssh-key
# 设置用户名、邮箱
git config --global user.name "netnr"
git config --global user.email "netnr@netnr.com"

# 查看
cd ~/.ssh && ls

# 生成密钥(ED25519 更小更快更安全,需要 OpenSSH 6.5 以上,推荐),密钥均为 256 位
ssh-keygen -t ed25519 -C "netnr"

# 查看公钥,拷贝到 GitHub => Settings => SSH and GPG keys => New SSH key
cat id_ed25519.pub

# 权限
chown 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519

# 验证是否成功,有 successfully 字样
ssh -T git@github.com

# 接下来
git clone git@github.com:netnr/proxy.git