Skip to content

Included project can't be fetched when git hash is used as ref #1800

@spike77453

Description

@spike77453

Minimal .gitlab-ci.yml illustrating the issue

---
include:
    - project: 'renovate-bot/renovate-runner'
      file: '/templates/renovate.gitlab-ci.yml'
      ref: b3a4c5e12ef9a5f138d9c8c6b901855ae717ca3b # v26.0.0

Expected behavior

$ gitlab-ci-local --stage deploy --variable CI_PIPELINE_SOURCE=schedule
...
parsing and downloads finished in 34 ms.
json schema validated in 121 ms
renovate starting ghcr.io/renovatebot/renovate:43 (deploy)
renovate copied to docker volumes in 280 ms
renovate $ renovate $RENOVATE_EXTRA_FLAGS
renovate >  INFO: Renovate started
renovate >        "renovateVersion": "43.59.6"
...

Host information
Fedora 42
gitlab-ci-local 4.68.1

Containerd binary
Same error message with --container-executable podman and --container-executable docker

Additional context
Actual result:

$ gitlab-ci-local --stage deploy --variable CI_PIPELINE_SOURCE=schedule
Project include could not be fetched { project: renovate-bot/renovate-runner, ref: b3a4c5e12ef9a5f138d9c8c6b901855ae717ca3b, file: templates/renovate.gitlab-ci.yml }
Error: Command failed with exit code 2: set -eou pipefail; git archive --remote=ssh://git@gitlab.com:22/renovate-bot/renovate-runner.git b3a4c5e12ef9a5f138d9c8c6b901855ae717ca3b templates/renovate.gitlab-ci.yml | tar -f - -xC .gitlab-ci-local/includes/gitlab.com/renovate-bot/renovate-runner/b3a4c5e12ef9a5f138d9c8c6b901855ae717ca3b/
fatal: sent error to the client: git upload-archive: archiver died with error
remote: fatal: no such ref: b3a4c5e12ef9a5f138d9c8c6b901855ae717ca3b        
remote: git upload-archive: archiver died with error
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

This does work fine when executed in an actual pipeline on gitlab.com
See https://docs.gitlab.com/ci/yaml/#includeproject for supported ref syntax

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions