我遇到了以下错误:
$ git push heroku master
Warning: Permanently added the RSA host key for IP address '50.19.85.132' to the list of known hosts.
! Your key with fingerprint b7:fd:15:25:02:8e:5f:06:4f:1c:af:f3:f0:c3:c2:65 is not authorized to access bitstarter.
我尝试添加密钥,但出现以下错误:
$ ssh-add ~/.ssh/id_rsa.pub
Could not open a connection to your authentication agent.
我在Ubuntu上遇到了同样的问题,其他的解决方案对我没有帮助。
我终于意识到我的问题是什么。我在/root/.SSH文件夹中创建了我的SSH密钥,所以即使我以root身份运行SSH-add,它也无法正常工作,一直在说:
无法打开与身份验证代理的连接。
我在/home/myUsername/文件夹中创建了SSH公钥和私钥
ssh-agent /bin/sh
然后我跑了
ssh-add /home/myUsername/.ssh/id_rsa
问题就这样解决了。
注意:要访问Git中的存储库,请在使用SSH keygen-t rsa-C“您的Git电子邮件”创建SSH密钥时添加Git密码。
我在Ubuntu上遇到了同样的问题,其他的解决方案对我没有帮助。
我终于意识到我的问题是什么。我在/root/.SSH文件夹中创建了我的SSH密钥,所以即使我以root身份运行SSH-add,它也无法正常工作,一直在说:
无法打开与身份验证代理的连接。
我在/home/myUsername/文件夹中创建了SSH公钥和私钥
ssh-agent /bin/sh
然后我跑了
ssh-add /home/myUsername/.ssh/id_rsa
问题就这样解决了。
注意:要访问Git中的存储库,请在使用SSH keygen-t rsa-C“您的Git电子邮件”创建SSH密钥时添加Git密码。