无法打开与身份验证代理的连接 [英] Could not open a connection to your authentication agent

查看:196
本文介绍了无法打开与身份验证代理的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到以下错误:

$ 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.

请参阅以下答案:

  1. ssh-add抱怨:无法打开与身份验证代理的连接
  2. Git推送需要用户名和密码(包含详细信息有关如何使用ssh-agent的说明)
  3. 如何运行(git/ssh)身份验证代理?.
  4. 无法打开与您的连接身份验证代理
  1. ssh-add complains: Could not open a connection to your authentication agent
  2. Git push requires username and password (contains detailed instructions on how to use ssh-agent)
  3. How to run (git/ssh) authentication agent?.
  4. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆