【问题标题】:Error when Trying to push local repository to github尝试将本地存储库推送到 github 时出错
【发布时间】:2021-12-22 10:03:43
【问题描述】:

大家好,我是 git/github 的新手,我尝试将我的 repo 推送到 github,但一直给我这个错误,尽管我按照所有说明将它推送到我的 github。 错误是:

$ git push --all origin
Enumerating objects: 979, done.
Counting objects: 100% (979/979), done.
Delta compression using up to 8 threads
Compressing objects: 100% (939/939), done.
Werror: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (979/979), 3.34 GiB | 2.72 MiB/s, done.
Total 979 (delta 169), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date

请有 git 知识的人帮助 git 初学者。

【问题讨论】:

  • 我昨天在尝试搜索问题的解决方案时进行了配置,但我一直收到错误。
  • 您使用的是什么操作系统,运行的是什么版本的 Git?
  • 在 Windows 和 git 版本是 2.33.1-64-bit
  • 看来这个错误是由一个错误的 https 连接引起的。尝试使用 ssh 连接到您的存储库。 docs.github.com/en/authentication/connecting-to-github-with-ssh 我建议克隆,做一个小改动,然后尝试提交和推送。

标签: git github git-push


【解决方案1】:

造成这种情况的原因可能是从您到 GitHub 的 HTTPS 连接不正确,您可以use SSH to connect

【讨论】:

    【解决方案2】:

    问题是由于 git/https 缓冲区设置造成的。 您可以通过将 postBuffer 的 git 配置从默认的 1MB 增加到 500MB 来解决此问题。

    git config http.postBuffer 524288000
    

    【讨论】:

      猜你喜欢
      • 2013-02-14
      • 1970-01-01
      • 1970-01-01
      • 2018-08-02
      • 2016-06-12
      • 2016-05-10
      • 1970-01-01
      • 2012-08-25
      • 2020-07-12
      相关资源
      最近更新 更多