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

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

问题描述

我遇到了以下错误:

$ 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 或操作系统,则可能需要使用该命令的变体,例如 other答案.

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 push 需要用户名和密码(包含详细有关如何使用 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.

To automatically start ssh-agent and allow a single instance to work in multiple console windows, see Start ssh-agent on login.

要找出原因,请参阅Robin Green 的回答.

此外,每当我使用 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天全站免登陆