使用ssh-add命令添加ssh私钥时报错

当使用ssh-add命令添加ssh私钥时,报如下错误:

Could not open a connection to your authentication agent.

其实需要先执行如下命令:

eval $(ssh-agent)

再执行ssh-add即可

参考资料:https://stackoverflow.com/questions/17846529/could-not-open-a-connection-to-your-authentication-agent

 

posted @ 2018-03-16 18:37  一菲聪天  阅读(1323)  评论(0编辑  收藏  举报