Skip to content

fatal: protocol error: bad line length character: PACK #647

@prologic

Description

@prologic

I'm getting a weird bug that I think is a bug in go-git.

On the client-side I'm seeing the following:

$ git pull -vvv --rebase
Server version is go-git/5.x
Server supports ofs-delta
want 526e79c8c4037c2fcbee50acc2d9be1992b60893 (refs/heads/main)
have 51ea2dea8b05b8e631928a990f16fe7566e3c96f
have 6901305097043b4a25e2e20bafab359e635fc476
have 5b5fab934eef3b3957fe5d712672487e9234d0ce
have 2f572924460cb3bcc140cb1b30fab1619bad9b5a
have b701bbb46c14441442376191fcd9476a0ede3120
have 070676a07101c3ddf22bc3169980e0c5068295c0
have f1b049c1238065e2b4908d8526a595dcc5e0a811
have 26fbee7ff623814fb37568c72c89ee515bfb7d8e
have 44101b43124b4eba0308dbeef85bd77b48230d93
have dae95318ea4236d3d157999b7ca2654edb06af36
have 6a7fff648f7922355a6fb965bf9b7c17d939d5e3
have c5bbbf3b1813827981a1746ad450afb10910c203
have f8d8ff5de51ba02b28a52b55ca0523b231ff8acd
have 6f8b2b27f5c3d35dfb41a5a38a3795d8c4962692
have 65d71b41dd0a5f531e9ca577ab11af88762a4e78
have 7d7bf6318f7470b17204767364ff22ff7ad2620d
POST git-upload-pack (903 bytes)
have 5fc5fd9ba13b98582cb2b7ae2b39f28ed7f127a0
have e99894102fc0c98583e35b42ffc2d578dc9a1c1c
have a0f95b37c000e3bda2af160f9ae24cbcc4def343
have 30b8f348eaf906caf0c32bba15b6b8868245d91f
have 5d4b79d0a19658b41ddbe2454f8699d841beb52f
have 99a6559b96f6fe976a5d5cd7b2f396d29492c8b9
have 74fcb64cc38fd5cc4d33c419e29c460f5be6f615
have 983dabb33c2dddcdba65b8ab9d0922bd338628aa
have 30559cd9c23ca4e803364ba1848442d217560143
have f661e6e4ce1177352b5bc40238351920cc25a69b
have 2b57b6e0b1b936f45aa4ed8fd0ed2f57b7d370f3
have 2fe14eca63e9d3e907c7b725407c146a82cc129f
have d58151dbb07a5d5dd7eaf6fc9f12566898823a46
have a64f9d8f14762e341a851d0e211814958e044a64
have d6b8143f569c95bda9a1e5a494affed26b058ce6
have 6e6648e344c889767240a33f42febf9498250131
fatal: protocol error: bad line length character: PACK

On the server-side the request/context is cancelled (probably becuase the client bailed above):

time="2022-12-29T14:59:47Z" level=error msg="error encoding upload-pack response" func=gitxt.net/gitxt/internal/git.UploadPackHandler.func1 file="/src/internal/git/handler.go:243" error="write tcp 10.0.2.216:5555->10.0.2.163:42390: write: broken pipe"
2022/12/29 14:59:47 http: superfluous response.WriteHeader call from gitxt.net/gitxt/internal/git.UploadPackHandler.func1 (handler.go:244)

I'm really not sure what's going wrong here 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingno-autocloseIssues/PRs to be ignored by stale bot

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions