检查是否已经存在SSH key
<span style="color:#000066;">$ ls -al ~/.ssh</span>
生成SSH key,将your_email@example.com替换成github的注册邮箱,
生成的SSH key默认保存在 ~/.ssh 文件夹中
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com" # Creates a new ssh key, using the provided email as a label Generating public/private rsa key pair.添加ssh key 到ssh-agent
$ ssh-add ~/.ssh/id_rsa
添加ssh key 到 github 账号中
1.copy ssh-key 到粘贴板
$ clip < ~/.ssh/id_rsa.pub
其余操作见
在github添加ssh key