GitHub上连接已有仓库时的认证,是通过使用SSH的公开密钥认证方式进行的。我们首先来创建SSH key,并将其添加到GitHub上。
首先先设置姓名和邮箱
1.创建SSH Key
$ ssh-keygen -t rsa -C "邮箱地址"
按回车键后输入密码和确认密码
创建SSH Key成功
2、获取公有密钥
$ cat ~/.ssh/id_rsa.pub
转载自:https://blog.csdn.net/chengliang666/article/details/100061965