本文介绍了“无法打开与您的身份验证代理的连接"; ,即使在ssh-agent启动后,ssh-add错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要添加多个ssh键,因此我需要执行ssh-add

I need to add multiple ssh keys , so i need to execute ssh-add

但是我得到了Could not open a connection to your authentication agent

我阅读了多个帖子,例如无法打开与您的身份验证代理 https://superuser.com/questions/901568/ssh-agent-could-not-open-connection

I read multiply posts like Could not open a connection to your authentication agent and https://superuser.com/questions/901568/ssh-agent-could-not-open-connection

我已经通过

eval ($ssh-agent -s)

,输出类似于: 特工pid 13524

and the output is like : Agent pid 13524

但仍然出现此错误:

 $ ssh-add ~/.ssh/id_rsa
 Could not open a connection to your authentication agent.

我也设置了

git config --global url."https://".insteadOf git://

然后我回显一些变量并得到它:

And I echo some variable and get this:

echo $SSH_AGENT_PID
12340
echo $SSH_AUTH_SOCK
/tmp/ssh-ZbRZr10908/agent.10908

PS:我正在使用Windows 7和下属公司的网络.

PS: I am using Windows 7 and the under company's network.

推荐答案

我在线尝试了许多解决方案,但没有任何效果.我进行了更多研究,发现以下命令有效.

I tried a lot of solutions online but nothing worked. I made more research and found that the following commands worked.

  1. sudo ssh-agent bash
  2. ssh-add/home/user/.ssh/id_rsa

这篇关于“无法打开与您的身份验证代理的连接"; ,即使在ssh-agent启动后,ssh-add错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 19:42