今天在使用git来克隆远程的代码的时候出现了permission deny的提示,发现是没有添加公钥。
使用ssh-add 直接添加的时候又报出了 Could not open a connection to your authentication agent 的提示。
解决办法:
依次执行下面的命令:
(1)exec ssh-agent bash
(2) eval ssh-agent -s
(3) ssh-add ~/.ssh/id_rsa
参考:http://stackoverflow.com/questions/24154816/git-bash-could-not-open-a-connection-to-your-authentication-agent