Skip to content

fetch param fails with 'fatal: git upload-pack: not our ref' when additional branch's submodule ref is different #311

@sooncj

Description

@sooncj

Fetching additional branches fails with the following error when the additional branch's submodule ref is different.

fatal: git upload-pack: not our ref 97c1942f8ada28687ece6f99cab8663422cb8719
fatal: the remote end hung up unexpectedly

Example:
example.git has a submodule at path common.

source:
  private_key: ...
  uri: example.git
  branch: develop
params:
  fetch: [ master ]

if common submodule ref on develop and master are the same, execution is successful.
if common submodule ref on develop and master are different, it will fail.

this seems related to the git version, something changed between 2.20.2 and 2.22.2
I tried the latest supported alpine tags:

  • this scenario works by switching the alpine base image to 3.9.5 (git 2.20.2) or lower
  • does not work on alpine 3.10.4 (git 2.22.2) or higher

work arounds:

  • as above, switch the alpine base image to 3.9.5 which has git 2.22.0
  • submodules: false :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions