Open gcstang opened 1 year ago
I was getting this same error, the issue here was getting the body gziped so the packp parser failed, so I solved it by uncompressing the gziped body before decoding the upload-pack request. Check if this is your case as well.
if err = upr.Decode(r.Body); chk.E(err) {
var rdr io.Reader
if rdr, err = gzip.NewReader(r.Body); !chk.E(err) {
if err = upr.Decode(rdr); chk.E(err) {
http.Error(w, err.Error(), 400)
return
}
}
http.Error(w, err.Error(), 400)
return
}
fixes the problem
When I'm trying use PlainClone over https on a cloudlab server I'm seeing 'invalid pkt-len found' This uses a token for authentication in the form of https://user:token@host.com
From my command line this works with git just not go-git.