“无法打开与您的身份验证代理的连接",ssh-add 错误即使在 ssh-agent 启动后 [英] "Could not open a connection to your authentication agent" ,ssh-add error even after ssh-agent started
问题描述
我需要添加多个ssh密钥,所以我需要执行ssh-add
但我收到 无法打开与您的身份验证代理的连接
我阅读了多个帖子,例如 无法打开与您的身份验证代理 和 https://superuser.com/questions/901568/ssh-agent-could-not-open-connection
我已经通过
启动了 ssh-agenteval ($ssh-agent -s)
输出如下:代理 pid 13524
但仍然出现此错误:
$ ssh-add ~/.ssh/id_rsa无法打开与您的身份验证代理的连接.
我也设置了
git config --global url."https://".insteadOf git://
我回显一些变量并得到这个:
回显 $SSH_AGENT_PID12340回声 $SSH_AUTH_SOCK/tmp/ssh-ZbRZr10908/agent.10908
PS:我使用的是 Windows 7 和下属公司的网络.
我在网上尝试了很多解决方案,但都没有奏效.我进行了更多研究,发现以下命令有效.
<块引用>- sudo ssh-agent bash
- ssh-add/home/user/.ssh/id_rsa
I need to add multiple ssh keys , so i need to execute ssh-add
But I get error of Could not open a connection to your authentication agent
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
I had started the ssh-agent by
eval ($ssh-agent -s)
and the output is like : Agent pid 13524
but still get this error:
$ ssh-add ~/.ssh/id_rsa
Could not open a connection to your authentication agent.
I also set
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: 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.
- sudo ssh-agent bash
- ssh-add /home/user/.ssh/id_rsa
这篇关于“无法打开与您的身份验证代理的连接",ssh-add 错误即使在 ssh-agent 启动后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!