小编典典

无法打开与您的身份验证代理的连接

git

我遇到了以下错误:

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

阅读 378

收藏
2022-02-14

共3个答案

小编典典

您可能需要ssh-agent在运行ssh-add命令之前启动:

eval `ssh-agent -s`
ssh-add

请注意,这将在 Windows 上启动 msysgit Bash的代理。如果您使用不同的 shell 或操作系统,您可能需要使用命令的变体

要自动启动 ssh-agent 并允许单个实例在多个控制台窗口中工作,

公钥与私钥

此外,每当我使用 时ssh-add,我总是向它添加私钥。该文件~/.ssh/id_rsa.pub看起来像一个公钥,我不确定这是否有效。你有~/.ssh/id_rsa档案吗?如果您在文本编辑器中打开它,它会说它是私钥吗?

2022-02-14
小编典典

以下命令对我有用。我正在使用 CentOS。

exec ssh-agent bash
2022-02-14
小编典典

以下命令对我有用。我正在使用 CentOS。

exec ssh-agent bash
2022-02-14