生成ssh-key for GIthub
在Github里,如果我们想通过ssh的方式进行身份验证,我们就需要建立ssh-key:
方法一:
git GUI,点击help,选择Generate ssh key
方法二:
在命令行中输入

把id_rsa.pub里的内容复制进去就可以了
ssh-keygen -t rsa -C "your_email@example.com"
默认会在相应路径下(/your_home_path)生成id_rsa
和id_rsa.pub
两个文件,如下面代码所示:
ssh-keygen -t rsa -C "your_email@example.com"
把这个SSH公钥放到github上。
把id_rsa.pub里的内容复制进去就可以了