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

Error pulling code from Gitee due to outdated go-git dependency #3477

Description

@zhouya2010

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:

  1. Configure Kaniko to clone a repository from Gitee (e.g., https://gitee.com/yszs/sip-service.git)

  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions