git "ssh-add ~/.ssh/id_rsa" Could not open a connection to your authentication agent问题解决

使用git,添加私钥时发生如下错误

ssh-add ~/.ssh/id_rsa

输出错误: Could not open a connection to your authentication agent

解决此问题的方法是执行下

eval `ssh-agent -s`

然后再次执行ssh-add ~/.ssh/id_rsa就可以顺利执行了

猜你喜欢

转载自blog.csdn.net/yajie_china/article/details/80645014
今日推荐