Loading

Generating SSH Keys for github

由于最近电脑重装了Windows 8.1, 想用github维护一些代码。故不得不重新生成一下ssh key。

按https://help.github.com/articles/generating-ssh-keys向导一步一步往下走。

当到如下这一步时,产生了一个错误。

$ ssh-add ~/.ssh/id_rsa
Could not open a connection to your authentication agent.

 

解决方案:

执行如下命令即可:

exec ssh-agent bash

完整的代码输出

$ exec ssh-agent bash
bash-3.1$ ssh-add ~/.ssh/id_rsa
Identity added: /c/Users/Yibang/.ssh/id_rsa (/c/Users/Yibang/.ssh/id_rsa)
bash-3.1$ clip < ~/.ssh/id_rsa.pub
bash-3.1$ ssh -T git@github.com
Hi zjlgdx! You've successfully authenticated, but GitHub does not provide shell
access.

 参考:http://blog.droidzone.in/2013/03/07/fix-for-ssh-add-could-not-open-a-connection-to-your-authentication-agent/

posted @ 2014-05-28 20:44  .net's  阅读(372)  评论(0编辑  收藏  举报