设置SSH key

github上来链接已有仓库时的认证,是通过使用了ssh的公开密钥认证方式进行的。

  • 创建SSH key
$ ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key
(/Users/your_user_directory/.ssh/id_rsa): 按回车键
Enter passphrase (empty for no passphrase): 输入密码
Enter same passphrase again: 再次输入密码

输入完成后会在个人文件夹出现一个.ssh 里面的id_rsa.pub就是公钥。粘贴进去github。ssh设置里面

猜你喜欢

转载自blog.csdn.net/weixin_33708432/article/details/87562797
今日推荐