我正试图将我的项目推送到GitHub的回购中,在写之前一切都很好
Git推送来源主
这需要很长时间,之后它会显示此错误:
Enumerating objects: 3739, done.
Counting objects: 100% (3739/3739), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2910/2910), done.
Writing objects: 100% (3738/3738), 52.08 MiB | 5.83 MiB/s, done.
Total 3738 (delta 1554), reused 0 (delta 0), pack-reused 0
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date
我写的所有命令:
git初始化
git添加。
git commit-m";新变化";
git推送原点主
有人知道问题出在哪里吗?
首先,生成ssh密钥,按照本文操作:
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
如果不起作用,请检查网络连接的稳定性。
如果网络连接没有问题,请尝试其他解决方案。它可能起作用:
---On Linux---
在执行Git命令之前,在命令行中执行以下操作:
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
---On Windows---
在执行Git命令之前,在命令行中执行以下操作:
set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1
此外:
git config --global core.compression 0
git clone --depth 1 <repo_URI>
# cd to your newly created directory
git fetch --unshallow
git pull --all
正如kodybrown所说:
---For PowerShell users---
$env:GIT_TRACE_PACKET=1
$env:GIT_TRACE=1
$env:GIT_CURL_VERBOSE=1