美文网首页
git ssh-add报错:Could not open a c

git ssh-add报错:Could not open a c

作者: 西红柿番茄酱_已认证 | 来源:发表于2021-12-22 16:37 被阅读0次

    今天配置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

    相关文章

      网友评论

          本文标题:git ssh-add报错:Could not open a c

          本文链接:https://www.haomeiwen.com/subject/mlgqqrtx.html