1 配置user name和email
git config --global user.name "xxx"
git config --global user.email "xxx"
2 生成秘钥时指定邮箱
ssh-keygen -t rsa -C "email_name@email"
git生成public key
原文:https://www.cnblogs.com/hustdc/p/9858976.html