I have a repo which is 1.4Gb, altho the actual code is more like 250Mb. I'm trying to use bfg
to get the size down.
When running git clone --mirror https://xxx@bitbucket.org/xxx/my-app.git
I'm getting:
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
I have the following env vars in place:
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
and the following .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
Most of the steps I've taken are based on advice from here: Github - unexpected disconnect while reading sideband packet
Is there anything I can do to get the mirror clone to work? Or anything I can do to further debug this issue?
Also the error implies this is a network issue, is that correct?
--
After great advice from @torek I ran
git fetch --deepen 1
but I get
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
Is this something I need to take up with bitbucket?