【发布时间】:2021-11-17 00:47:40
【问题描述】:
我有一个 1.4Gb 的存储库,但实际代码更像是 250Mb。我正在尝试使用bfg 来缩小尺寸。
运行时git clone --mirror https://xxx@bitbucket.org/xxx/my-app.git
我明白了:
16:13:59.706806 pkt-line.c:80 packet: sideband< \2Compressing objects: 99% (2662/2679)\15
16:14:00.093716 pkt-line.c:80 packet: sideband< \2Compressing objects: 100% (2679/2679)\15
16:14:00.094381 pkt-line.c:80 packet: sideband< \2Compressing objects: 100% (2679/2679), done.
remote: Compressing objects: 100% (2679/2679), done.
16:14:00.126076 pkt-line.c:80 packet: sideband< PACK ...
16:14:00.126414 run-command.c:664 trace: run_command: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 22026 on My-Mac-mini' --check-self-contained-and-connected --pack_header=2,43919
16:14:00.144702 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Applications/Xcode-13.0.0-Release.Candidate.app/Contents/Developer/usr/libexec/git-core/git
16:14:00.146271 exec-cmd.c:238 trace: resolved executable dir: /Applications/Xcode-13.0.0-Release.Candidate.app/Contents/Developer/usr/libexec/git-core
16:14:00.147252 git.c:444 trace: built-in: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 22026 on My-Mac-mini' --check-self-contained-and-connected --pack_header=2,43919
16:21:03.324329 http.c:756 == Info: Connection #0 to host bitbucket.org left intact
16:21:03.324455 pkt-line.c:80 packet: git< 0000
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: index-pack failed
我有以下环境变量:
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
还有以下.gitconfig:
[core]
excludesfile = /Users/lewissmith/.gitignore_global
compression = 0
packedGitLimit = 512m
packedGitWindowSize = 512m
[commit]
template = /Users/xxx/.stCommitMsg
[pack]
deltaCacheSize = 2047m
packSizeLimit = 2047m
windowMemory = 2047m
我采取的大部分步骤都是基于这里的建议:Github - unexpected disconnect while reading sideband packet
我可以做些什么来让镜像克隆工作吗?或者我可以做些什么来进一步调试这个问题?
这个错误还暗示这是一个网络问题,对吗?
--
在@torek 的好建议之后,我跑了
git fetch --deepen 1
但我明白了
13:54:22.746101 http.c:756 == Info: Connection #0 to host bitbucket.org left intact
13:54:22.746280 pkt-line.c:80 packet: git< 0000
fetch-pack: unexpected disconnect while reading sideband packet
fatal: protocol error: bad pack header
这是我需要处理 bitbucket 的事情吗?
【问题讨论】:
标签: git