Skip to content

[BUG] GitRepo with tag-based revision fails with "reference not found" after v0.15.0 gitcloner rework #5181

@cody-reibsome

Description

@cody-reibsome

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

After upgrading to Rancher v2.14.1 (Fleet v0.15.1), GitRepo resources whose spec.revision is a git tag name (no spec.branch set) fail to reconcile with:

Failed to resolve revision repo="https://git.example.com/group/repo.git" branch="" revision="2.0.0" path="/workspace": reference not found

Expected Behavior

spec.revision should resolve any commit that the underlying git repo advertises — including tags — as it did prior to v0.15.0.

Steps To Reproduce

  1. Push a tag (e.g. 2.0.0) to a git repo.
  2. Create a GitRepo:
    apiVersion: fleet.cattle.io/v1alpha1
    kind: GitRepo
    metadata:
    name: example
    namespace: fleet-default
    spec:
    repo: https://git.example.com/group/repo.git
    revision: "2.0.0"
  3. Observe the relevant gitcloner-initializer container logs / GitRepo status — reconcile fails with reference not found.

Environment

- Architecture: amd64
- Fleet Version: 0.15.1
- Cluster:
  - Provider: RKE2
  - Kubernetes Version: v1.35.3+rke2r3

Logs

{"fleetErrorMessage":"failed to resolve revision repo=\"https://<omitted>.git\" branch=\"\" revision=\"2.0.0\" path=\"/workspace\": reference not found","level":"fatal","msg":"Fleet cli failed","time":"2026-05-21T17:33:25Z"}

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions