在执行 git clone
命令遇到以下错误:
remote: Enumerating objects: 1252, done.
remote: Counting objects: 100% (1252/1252), done.
remote: Compressing objects: 100% (788/788), done.
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
参考 Github - unexpected disconnect while reading sideband packet,对于 CMD,执行
set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1
对于 Linux,执行
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
对于 PowerShell,执行
$env:GIT_TRACE_PACKET=1
$env:GIT_TRACE=1
$env:GIT_CURL_VERBOSE=1
然后执行文章来源:https://www.toymoban.com/news/detail-503062.html
git config --global core.compression 0
git clone --depth 1 <repo_URI>
# cd to your newly created directory
git fetch --unshallow
git pull --all
注意:这里的仓库 URI 必须为 HTTP(https://github.com/),不能为 SSH(git@github.com:)。文章来源地址https://www.toymoban.com/news/detail-503062.html
到了这里,关于Git clone fetch-pack unexpected disconnect while reading sideband packet的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!