[英]Push the project into Git Hub and can't
我正在尝试将我的项目推送到 GitHub 中的回购协议中,在写入之前一切正常
Git push origin main
这需要很长时间,然后显示此错误:
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 push origin main
任何人都知道是什么问题?
首先,生成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
正如科迪布朗所说:
---For PowerShell users---
$env:GIT_TRACE_PACKET=1
$env:GIT_TRACE=1
$env:GIT_CURL_VERBOSE=1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.