16

所以我使用以下命令开始了 Jekyll 网站的制作,

$ git clone https://github.com/plusjade/jekyll-bootstrap.git USERNAME.github.com
$ cd USERNAME.github.com
$ git remote set-url origin git@github.com:USERNAME/USERNAME.github.com.git

在设置了本地和 github 存储库后,我尝试将更改发送到 github,

$ git push origin master

找到这个,

Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

我做错了什么?我能做些什么来解决这个错误?

4

4 回答 4

18

问题是你没有用 Github 初始化 SSH 密钥。这为我解决了它:

cd ~/.ssh && ssh-keygen
cat id_rsa.pub 

并将密钥复制到 Github 网站的 SSH 设置中。

那么你可以继续。

于 2014-01-10T19:21:45.707 回答
4

Permission denied (publickey) 意味着服务器拒绝了你的连接。查看https://help.github.com/articles/error-permission-denied-publickey了解详情

于 2013-10-20T03:26:37.203 回答
0

您从 Github 帐户创建 SSH。
https://help.github.com/articles/generating-ssh-keys

于 2014-03-31T07:58:27.357 回答
0

如果您要推送大文件,请尝试此操作,它将推送容量更改为 500 MB

$ git config http.postBuffer 524288000 

或试试这个,将原点设置为 master

$ git push origin master 

或检查您的 Internet 连接代理设置。如果您使用的是某些代理,请将其更改为 noproxy。git push 将在 noproxy 模式下工作。

于 2015-02-05T12:43:36.940 回答