git Permission Denied (publickey)/fatal:远端意外挂断?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19471599/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Permission Denied (publickey)/fatal: The remote end hung up unexpectedly?
提问by sharksfan98
So I started the production for a Jekyll site using the following commands,
所以我使用以下命令开始制作 Jekyll 站点,
$ git clone https://github.com/plusjade/jekyll-bootstrap.git USERNAME.github.com
$ cd USERNAME.github.com
$ git remote set-url origin [email protected]:USERNAME/USERNAME.github.com.git
After getting a local and github repo set up, I tried to send the changes to github,
在设置了本地和 github 存储库后,我尝试将更改发送到 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?
我做错了什么?我该怎么做才能解决此错误?
采纳答案by Michael Ver
Permission denied (publickey) means that that the server rejected your connection. Check https://help.github.com/articles/error-permission-denied-publickeyfor details
Permission denied (publickey) 表示服务器拒绝了您的连接。查看https://help.github.com/articles/error-permission-denied-publickey了解详情
回答by Laurence
The problem is that you haven't initialized SSH keys with Github. This solved it for me:
问题是您尚未使用 Github 初始化 SSH 密钥。这为我解决了:
cd ~/.ssh && ssh-keygen
cat id_rsa.pub
and copy the key into the SSH settings of the Github website.
并将密钥复制到 Github 网站的 SSH 设置中。
Then you're good to continue.
那你就可以继续了。
回答by Faiq Adam
You create SSH From Github Account.
https://help.github.com/articles/generating-ssh-keys
您从 Github 帐户创建 SSH。
https://help.github.com/articles/generating-ssh-keys
回答by Ravi
If you are pushing large files then try this, It will change the pushing capacity to 500 MB
如果您要推送大文件,请尝试此操作,它将推送容量更改为 500 MB
$ git config http.postBuffer 524288000
or try this, set the origin to master
或者试试这个,将原点设置为 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.
或检查您的互联网连接的代理设置。如果您正在使用某些代理,请将其更改为 noproxy。git push 将在 noproxy 模式下工作。