concourse / concourse/git-resource
fetch param fails with 'fatal: git upload-pack: not our ref' when additional branch's submodule ref is different
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 203
- Forks
- 305
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 2
Description
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:(
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the fetch using the issue's example with different submodule refs on develop and master, then compare Alpine 3.9.5/Git 2.20.2 with Alpine 3.10.4/Git 2.22.2. Verify whether fetching the additional branch succeeds without changing the submodule configuration or disabling submodules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, shell
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100