【发布时间】:2012-11-03 06:24:44
【问题描述】:
为什么我会收到以下错误(在之前已正确设置 github 连接的相同机器上)?意思是,它在前一天有效(例如,我可以push、pull 等没有问题)但第二天就不行了。
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
当我做ssh-add:
$ ssh-add -l
The agent has no identities.
之前加载到 SSH 中的密钥是否有可能被自动卸载?
以下解决了这个问题(供参考):
ssh-add ~/.ssh/github_rsa
Enter passphrase for /Users/admin/.ssh/github_rsa:
Identity added: /Users/admin/.ssh/github_rsa (/Users/admin/.ssh/github_rsa)
【问题讨论】:
-
你在使用 GitHub for Windows 吗?
-
我正在使用 GitHub for Mac,War Room (87)。
-
那么可能凭证助手 (stackoverflow.com/questions/13385690/…) 只记住了您上一次会话的密码,您必须在下一次会话时再次输入。
标签: command-line github ssh ssh-keys