Permission Denied (publickey)/fatal: The remote en

2019-02-02 14:11发布

So I started the production for a Jekyll site using the following commands,

$ 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

After getting a local and github repo set up, I tried to send the changes to github,

$ git push origin master

to find this,

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

What did I do wrong? What can I do to resolve this error?

标签: git github ssh
4条回答
再贱就再见
2楼-- · 2019-02-02 14:28

The problem is that you haven't initialized SSH keys with Github. This solved it for me:

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

and copy the key into the SSH settings of the Github website.

Then you're good to continue.

查看更多
Anthone
3楼-- · 2019-02-02 14:32

Permission denied (publickey) means that that the server rejected your connection. Check https://help.github.com/articles/error-permission-denied-publickey for details

查看更多
Anthone
4楼-- · 2019-02-02 14:47

If you are pushing large files then try this, It will change the pushing capacity to 500 MB

$ git config http.postBuffer 524288000 

or try this, set the origin to master

$ git push origin master 

or Check your proxy setting of internet connection.If you are using some proxy then change it to noproxy. git push will work in noproxy mode.

查看更多
我只想做你的唯一
5楼-- · 2019-02-02 14:50
登录 后发表回答