This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Description
When using Kaniko to pull code from Gitee (https://gitee.com/), I encounter the following error:
Error: error resolving source context: error decoding upload-pack response: invalid pkt-len found
After investigation, I found this is caused by an outdated version of github.com/go-git/go-git/v5 in Kaniko's dependencies. When testing with the latest version of go-git, the issue is resolved.
Reproduction Steps:
-
Configure Kaniko to clone a repository from Gitee (e.g., https://gitee.com/yszs/sip-service.git)
-
Observe the "invalid pkt-len found" error
Test Case:
I verified the fix by testing with the latest go-git version:
_, err := git.PlainClone("/tmp/foo", false, &git.CloneOptions{
URL: "https://gitee.com/yszs/sip-service.git",
Progress: os.Stdout,
})
Suggested Solution:
Please update the github.com/go-git/go-git/v5 dependency to the latest version to resolve this compatibility issue with Gitee.
Additional Context:
This appears to be related to how go-git handles the git protocol packets from Gitee's servers, which was improved in later versions.