无法打开与身份验证代理的连接 [英] Could not open a connection to your authentication agent
问题描述
我遇到以下错误:
$ 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.
推荐答案
您是否开始ssh-agent
?
在运行ssh-add
命令之前,您可能需要启动ssh-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
请注意,这将启动Windows上的 msysgit Bash 的代理.如果您使用的是其他Shell或操作系统,则可能需要使用命令的变体,例如其他答案.
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.
请参阅以下答案:
- ssh-add抱怨:无法打开与身份验证代理的连接
- Git推送需要用户名和密码(包含详细信息有关如何使用ssh-agent的说明)
- 如何运行(git/ssh)身份验证代理?.
- 无法打开与您的连接身份验证代理
- ssh-add complains: Could not open a connection to your authentication agent
- Git push requires username and password (contains detailed instructions on how to use ssh-agent)
- How to run (git/ssh) authentication agent?.
- Could not open a connection to your authentication agent
要自动启动ssh-agent并允许单个实例在多个控制台窗口中工作,请参见在登录时启动ssh-agent a>.
To automatically start ssh-agent and allow a single instance to work in multiple console windows, see Start ssh-agent on login.
要找出原因,请参见罗宾·格林的答案.
此外,每当我使用ssh-add
时,我总是向其添加私钥.文件~/.ssh/id_rsa.pub
看起来像一个公共密钥,我不确定是否可以使用.您有~/.ssh/id_rsa
文件吗?如果您在文本编辑器中将其打开,是否表示它是私钥?
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?
这篇关于无法打开与身份验证代理的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!