Skip to content

clone fails on macOS (case-insensitive filesystem) for _forks_ of repositories with case-folding collisions in tags #12328

@jsoref

Description

@jsoref

Describe the bug

error: You're on a case-insensitive filesystem, and the remote you are
trying to fetch from has references that only differ in casing. It
is impossible to store such references with the 'files' backend. You
can either accept this as-is, in which case you won't be able to
store all remote references on disk. Or you can alternatively
migrate your repository to use the 'reftable' backend with the
following command:

    git refs migrate --ref-format=reftable

Please keep in mind that not all implementations of Git support this
new format yet. So if you use tools other than Git to access this
repository it may not be an option to migrate to reftables.

failed to run git: exit status 1

Affected version

gh version 2.83.2 (2025-12-10)
https://github.com/cli/cli/releases/tag/v2.83.2

Steps to reproduce the behavior

  1. Type this gh repo clone check-spelling-sandbox/runner-images-broken-tags-fork broken

  2. View the output

  3. See error

  4. Type this gh repo clone check-spelling-sandbox/runner-images-broken-tags confusing

  5. View the output

  6. Don't see the error

Expected vs actual behavior

For broken you see:

 * [new branch]        main                        -> upstream/main
 * [new tag]           macOS-13/20230419.1         -> macOS-13/20230419.1
 * [new tag]           macos-10.15/20200806.4      -> macos-10.15/20200806.4
 * [new tag]           macos-10.15/20200819.1      -> macos-10.15/20200819.1
 * [new tag]           macos-10.15/20200825.1      -> macos-10.15/20200825.1
 * [new tag]           macos-10.15/20200829.1      -> macos-10.15/20200829.1
 * [new tag]           macos-10.15/20200903.1      -> macos-10.15/20200903.1
 * [new tag]           macos-13-arm64/20230924.3   -> macos-13-arm64/20230924.3
 * [new tag]           macos-13-arm64/20240728.2   -> macos-13-arm64/20240728.2
 * [new tag]           macos-13-arm64/20241021.263 -> macos-13-arm64/20241021.263
 * [new tag]           macos-13/20230419.1         -> macos-13/20230419.1
...

followed by:

error: You're on a case-insensitive filesystem, and the remote you are
trying to fetch from has references that only differ in casing. It
is impossible to store such references with the 'files' backend. You
can either accept this as-is, in which case you won't be able to
store all remote references on disk. Or you can alternatively
migrate your repository to use the 'reftable' backend with the
following command:

    git refs migrate --ref-format=reftable

Please keep in mind that not all implementations of Git support this
new format yet. So if you use tools other than Git to access this
repository it may not be an option to migrate to reftables.

failed to run git: exit status 1

For confusing, you see:

Cloning into 'confusing'...
remote: Enumerating objects: 55579, done.
remote: Counting objects: 100% (198/198), done.
remote: Compressing objects: 100% (138/138), done.
remote: Total 55579 (delta 152), reused 60 (delta 60), pack-reused 55381 (from 4)
Receiving objects: 100% (55579/55579), 14.32 MiB | 12.80 MiB/s, done.
Resolving deltas: 100% (37909/37909), done.

Logs

Paste the activity from your command line. Redact if needed.

Notes

  1. There was absolutely no good reason for the actions/runner-images to have both macOS-13/20230419.1 and macos-13/20230419.1, but it did until The presence of the macOS-13/20230419.1 makes gh repo clone ... for forks of this repository die horribly actions/runner-images#13451 (comment).
  2. https://github.com/check-spelling-sandbox/runner-images-broken-tags-fork/branches has 1 item (the default branch)
  3. https://github.com/check-spelling-sandbox/runner-images-broken-tags-fork/tags has 0 items

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions