通过命令生成密钥:
ssh-keygen -t rsa -C “924117580@qq.com”
按3个回车,密码为空。
Your identification has been saved in /home/tekkub/.ssh/id_rsa.
Your public key has been saved in /home/tekkub/.ssh/id_rsa.pub.
The key fingerprint is:
最后得到了两个文件:id_rsa和id_rsa.pub
将id_rsa的内容复制到github右上角设置中的SSH key中 添加即可,注意一定要是id_rsa.pub 有.pub后缀的文件不然会报错!