$ ssh-agent -s
# Agent pid 59566
$ ssh-add ~/.ssh/id_rsa
Could not open a connection to your authentication agent.
那么执行
eval `ssh-agent -s`
后重新执行
$ ssh-add ~/.ssh/id_rsa
最后将public key添加在github
测试是否生效
$ ssh -T [email protected] 或者 ssh -vvv [email protected]
# Attempts to ssh to GitHub
没错误就是成功了