git ssh-add报错:Could not open a connection to your authentication agent

今天配置ssh到ssh-add这步一直报错:Could not open a connection to your authentication agent.

百度了很多方法,最终在stackexchange上终于找到了解决方案。
我亲测有用的是用这个命令:

eval "$(ssh-agent)"

然后再 ssh-add 。
如果已经有ssh的进程,运行这个:

ps aux | grep ssh

然后再kill掉ssh的所有进程,再运行eval "$(ssh-agent)",再运行ssh-add。
更多方法贴下链接,可能需要翻q。
https://unix.stackexchange.com/questions/48863/ssh-add-complains-could-not-open-a-connection-to-your-authentication-agent/48868#48868

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容