「已解决」Github SSH密钥无法绑定
Introduction
在windows上尝试给github绑定SSH密钥,已经在github设置中成功添加,但每次git push均无法验证成功。探索后认为是由于密钥格式以及长度等信息不符合要求,所以重新生成密钥,专门对github进行SSH验证。
重新生成密钥
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa_github |
命令说明:
ssh-keygen 生成密钥
-t rsa 指定密钥类型为rsa
-b 4096 指定密钥长度为4096
-f ~/.ssh/id_rsa_github 保存位置和文件名称
修改config
修改~/.ssh/config文件,存在多个密钥时,指定使用哪个密钥
Host github.com |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment





