【问题标题】:Permission Denied (publickey)/fatal: The remote end hung up unexpectedly?Permission Denied (publickey)/fatal: 远端意外挂断?
【发布时间】:2013-10-19 21:56:03
【问题描述】:

所以我使用以下命令开始了 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

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

【问题讨论】:

    标签: git github ssh


    【解决方案1】:

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

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

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

    那么你可以继续。

    【讨论】:

      【解决方案2】:

      Permission denied (publickey) 表示服务器拒绝了您的连接。详情请查看https://help.github.com/articles/error-permission-denied-publickey

      【讨论】:

        【解决方案3】:

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

        【讨论】:

        【解决方案4】:

        如果你正在推送大文件,那么试试这个,它会将推送容量更改为 500 MB

        $ git config http.postBuffer 524288000 
        

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

        $ git push origin master 
        

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

        【讨论】:

          猜你喜欢
          • 2015-03-11
          • 1970-01-01
          • 2015-12-27
          • 2016-08-01
          • 2013-02-04
          • 2012-08-19
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多