1.cd ~/.ssh
2.ssh-keygen -t rsa -C "xxxxxx@xxxxx" (xxxx:你的github注册邮箱)
3.Enter file in which to save the key (/Users/nnn/.ssh/id_rsa): xxxxx (xxxxx:key名称)
4.生成.pub文件后,输入命令 open ~/.ssh
5.打开.ssh/config文件,修改 config文件中的IdentityFile /Users/huangqi/.ssh/xxxxxx (xxxxxx:.pub文件名称)
6.打开git->setting->ssh->粘贴.pub