Git 连接 GitHub 添加SSH Key
- 登录GitHub点击右上角个人头像里的Settings
- 点击左侧SSH add GPG keys 点击
- 点击Adding a new SSH key to your GitHub account
4. 点击Generated a new SSH key and added it to the ssh-agent
5. 选择你本地电脑对应的系统
6. 在本地创建 SSH Key
Windows打开 Bash
Linux 打开 Terminal
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
其中【your_email@example.com】替换成你自己的邮箱
- 运行成功将会在文件夹中生成一个隐藏的文件夹.ssh,其中id_rsa.pub中就是你的SSH Key,复制
- 到个人头像里的Settings中的SSH and GPG keys 中添加,搞定