Could not open a connection to your authentication agent
I am running into this error of:
$ 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.
I tried to add the keys and I get this error below:
$ ssh-add ~/.ssh/id_rsa.pub
Could not open a connection to your authentication agent.
Did You Start ssh-agent
?
You might need to start ssh-agent
before you run the ssh-add
command:
eval `ssh-agent -s`
ssh-add
Note that this will start the agent for msysgit Bash on Windows . If you're using a different shell or operating system, you might need to use a variant of the command, such as those listed in the other answers.
See the following answers:
To automatically start ssh-agent and allow a single instance to work in multiple console windows, see Start ssh-agent on login.
Why do we need to use eval
instead of just ssh-agent
?
To find out why, see Robin Green's answer.
Public vs Private Keys
Also, whenever I use ssh-add
, I always add private keys to it. The file ~/.ssh/id_rsa.pub
looks like a public key, I'm not sure if that will work. Do you have a ~/.ssh/id_rsa
file? If you open it in a text editor, does it say it's a private key?
I tried the other solutions to no avail. I made more research and found that the following command worked. I am using Windows 7 and Git Bash.
eval $(ssh-agent)
More information in: https://coderwall.com/p/rdi_wq
The following command worked for me. I am using CentOS.
exec ssh-agent bash
链接地址: http://www.djcxy.com/p/27062.html
上一篇: https网址中的用户名和密码
下一篇: 无法打开与身份验证代理的连接