打开GIT Bash,然后输入以下命令
1、配置用户名
git config --global user.name "xxx"
2、配置邮箱
git config --global user.email "xxxx@qq.com"
3、查看配置
git config -l
4、生成公钥和私钥
ssh-keygen -t rsa -C "xxxx@qq.com"
5、查看公钥
cat ~/.ssh/id_rsa.pub
6、复制步骤4显示出来公钥,然后去网站中设置SSH Keys即可
原文:https://www.cnblogs.com/hblogs/p/14879155.html