ssh-keygen -t rsa -b 4096 -C "your_email@example.com" -f ~/.ssh/github_id_rsa
在config文件添加配置(没有config文件则新建):
# github
Host github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/github_id_rsa
复制~/.ssh/github_id_rsa.pub内容在github上添加公钥
ssh -T git@github.com