【发布时间】:2013-02-04 17:34:35
【问题描述】:
我正在学习"Try Git" 教程。
当我到达“1.11 远程推送”一章时,尝试运行:
$ git push -u orgin master
我收到此错误:
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
有什么想法吗?
【问题讨论】:
我正在学习"Try Git" 教程。
当我到达“1.11 远程推送”一章时,尝试运行:
$ git push -u orgin master
我收到此错误:
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
有什么想法吗?
【问题讨论】:
您可以使用以下命令获取默认帐户的密钥。
$ ssh-keygen -t rsa
更多信息:Multiple SSH Keys settings for different github account
【讨论】:
您可能没有向 SSH 密钥添加公共密钥。这样做:
$ ssh-keygen -t rsa
将创建的公钥(id_rsa.pub)复制到您帐户的list of SSH keys,然后再次尝试推送。
请参阅相关帮助页面:Generating SSH Keys 以获得更深入的回复。
【讨论】: