Git 使用ssh密钥

由于蛮久没有接触到Git和Github了,许多东西都有点忘了= =。
趁着这个时间,重新学习下。

配置本机的git

git config --global user.name "abcd"
git config --global user.email abcd@efgh.com

使用命令验证下:

生成密钥

ssh-keygen -t rsa -C "abcd@efgh.com" //邮箱同上
cat ~/.ssh/id_rsa.pub //复制里面的密钥

在Github上添加密钥

Settings -> SSH Keys
将刚才的密钥粘贴上去即可。

使用git clone下来了一个自己fork来的一个分支。

2016/9/24

原文地址:https://www.cnblogs.com/qq952693358/p/5902697.html