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"

# 看有没有 id_rsa 和 id_rsa.pub
cd ~/.ssh && ls

# 生成密钥对,不设置密钥直接 Enter 三次,不改名
ssh-keygen -t rsa -C "netnr@netnr.com"

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

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

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