Mac电脑生成SSH key和Github通信
1、检查ssh
Hunter-Mac:Highter.github.io yangjianwei$ ls -al ~/.ssh
total 16
drwx------ 3 yangjianwei staff 102 Dec 13 15:20 .
drwxr-xr-x+ 60 yangjianwei staff 2040 May 14 14:58 ..
注意:如果已经存在ssh key,则可以看到 id_rsa 和 id_rsa.pub ,可跳过第二步。
2、生成ssh
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
邮箱填写自己的邮箱,中间一直按回车即可。
3、查看本地ssh
查看ssh的key值
Hunter-Mac:.ssh yangjianwei$ cat ~/.ssh/id_rsa.pub
4、github配置ssh
在github上找到ssh配置页面,Profile->SSH and GPG keys->New SSH key,填写ssh的title和key值
更多详情,请关注我的博客https://highter.github.io