$ ssh-add ~/.ssh/id_rsa.pub
Could not open a connection to your authentication agent.
启动ssh-agent服务
eval `ssh-agent -s`
再运行
$ ssh-add
Identity added: /c/Users/name/.ssh/id_rsa (/c/Users/name/.ssh/id_rsa)
参考链接:http://*.com/questions/17846529/could-not-open-a-connection-to-your-authentication-agent