为什么 git push 会失败? “错误:RPC 失败;curl 18 传输关闭,剩余未读数据”; “发送包:意外断开,而

问题描述

我一直在尝试将一些文件git push 放入我刚创建的存储库中,但一直失败。

我已经尝试将 http.version 从 HTTP/2 更改为 HTTP/1.1(我都尝试过)并且我还增加http.postBufferhttp.maxRequestBuffer 的大小。我在网上找到的大多数修复程序都建议更改其中一项或两项。

我本地工作目录中的最大文件为 24.6 MB(不包括 .pack 文件),因此我不必使用 Git LFS。

以下是 git config --list 的一些输出

diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=false
pull.rebase=false
credential.helper=manager-core
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master
core.editor="C:\Users\username\AppData\Local\Programs\Microsoft VS Code\Code.exe"
--wait
core.longpaths=true
core.compression=0
gui.recentrepo=C:/Users/username/path/to/myRepo
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
...
http.postbuffer=30000000
http.version=HTTP/1.1
http.maxrequestbuffer=300000000
credential.helper=wincred
core.bare=false
core.repositoryformatversion=0
core.filemode=false
core.symlinks=false
core.ignorecase=true
core.logallrefupdates=true
remote.origin.url=https://github.com/username/myRepo.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.pushurl=https://github.com/username/myRepo.git
branch.main.remote=origin
branch.main.merge=refs/heads/main

这是git push之后的输出

Enumerating objects: 177,done.
Counting objects: 100% (177/177),done.
Delta compression using up to 8 threads
Compressing objects: 100% (168/168),done.
error: RPC Failed; curl 18 transfer closed with outstanding read data remaining
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (177/177),444.10 MiB | 612.00 KiB/s,done.
Total 177 (delta 5),reused 177 (delta 5),pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date

除 Windows Defender 外,我没有使用任何防病毒软件/防火墙。

请帮忙。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)