这个问题缘由是ssh认证错误,即便github已经添加了正确公钥。git
解决方法两个:github
ssh-keygen
文件名也用默认的id_rsa
,路径也是默认的,不要修改
而后CMD下执行bash
start-ssh-agent
可是若是使用多个密钥或者使用自定义的密钥就不行了,至少我没找到方法,这个时候自定义的ssh
私钥就比较麻烦。ssh
ssh-add
添加密钥这个时候可能出门另外一个问题,即加密
Error connecting to agent: No such file or directory
或code
Could not open a connection to your authentication agent
Windows上处理起来真的比较麻烦,怎么解决有时间单独水一贴去了,挺麻烦的,已查到的解决方法也很曲折(没时间就不说了)
简单的方法来讲,在git bash
里面执行,注意不是CMD或PS里面!it
eval `ssh-agent -s`
或io
eval $(ssh-agent -s)
再添加密钥就行了变量
ssh-add 密钥路径
这个时候添加私钥就没有问题了,至于出问题缘由应该是环境变量配置的问题,具体细节也不是很清楚,若是有时间再去折腾了。配置