git clone is broken #278

Closed
opened 2026-01-19 18:29:54 +00:00 by michael · 3 comments
Owner

Originally created by @bernstei on GitHub.

Summary

A fresh git clone fails

Steps to reproduce

run git clone https://github.com/usnistgov/macos_security.git

Operating System version

OS X Big Sur 11.5.1

What is the current bug behavior?

An error message at the end of the clone about failed checkout

What is the expected correct behavior?

working clone/checkout

Relevant logs and/or screenshots

> git clone https://github.com/usnistgov/macos_security.git
Cloning into 'macos_security'...
remote: Enumerating objects: 6866, done.
remote: Counting objects: 100% (1276/1276), done.
remote: Compressing objects: 100% (462/462), done.
remote: Total 6866 (delta 1002), reused 903 (delta 812), pack-reused 5590
Receiving objects: 100% (6866/6866), 2.08 MiB | 2.98 MiB/s, done.
Resolving deltas: 100% (5651/5651), done.
error: unknown object type 5 at offset 122947 in <obscured_path>/macos_security/.git/objects/pack/pack-4d226641dcff7c718a12db0e50551c0557cd0d85.pack
fatal: packed object 02dd17bb59a7f084f2f43f77dbcadd2ddf758e21 (stored in <obscured_path>/macos_security/.git/objects/pack/pack-4d226641dcff7c718a12db0e50551c0557cd0d85.pack) is corrupt
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
>

Output of checks

N/A

Possible fixes

unknown

Originally created by @bernstei on GitHub. ### Summary A fresh git clone fails ### Steps to reproduce run `git clone https://github.com/usnistgov/macos_security.git` ### Operating System version OS X Big Sur 11.5.1 ### What is the current *bug* behavior? An error message at the end of the clone about failed checkout ### What is the expected *correct* behavior? working clone/checkout ### Relevant logs and/or screenshots ``` > git clone https://github.com/usnistgov/macos_security.git Cloning into 'macos_security'... remote: Enumerating objects: 6866, done. remote: Counting objects: 100% (1276/1276), done. remote: Compressing objects: 100% (462/462), done. remote: Total 6866 (delta 1002), reused 903 (delta 812), pack-reused 5590 Receiving objects: 100% (6866/6866), 2.08 MiB | 2.98 MiB/s, done. Resolving deltas: 100% (5651/5651), done. error: unknown object type 5 at offset 122947 in <obscured_path>/macos_security/.git/objects/pack/pack-4d226641dcff7c718a12db0e50551c0557cd0d85.pack fatal: packed object 02dd17bb59a7f084f2f43f77dbcadd2ddf758e21 (stored in <obscured_path>/macos_security/.git/objects/pack/pack-4d226641dcff7c718a12db0e50551c0557cd0d85.pack) is corrupt warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry with 'git restore --source=HEAD :/' > ``` ### Output of checks N/A ### Possible fixes unknown
Author
Owner

@bernstei commented on GitHub:

I'm having all sorts of strange issues, so maybe it's just my filesystem. FWIW, when I did try to follow that suggestion I got a very similar error. I'll close this soon if I decided that it really is just my filesystem.

@bernstei commented on GitHub: I'm having all sorts of strange issues, so maybe it's just my filesystem. FWIW, when I did try to follow that suggestion I got a very similar error. I'll close this soon if I decided that it really is just my filesystem.
Author
Owner

@golbiga commented on GitHub:

@bernstei unfortunately we cannot replicate this issue. What happened when you followed this:

You can inspect what was checked out with 'git status' and retry with 'git restore --source=HEAD :/'

From what I can tell the pack-4d226641dcff7c718a12db0e50551c0557cd0d85.pack is corrupted, you can try removing it and doing a git fetch & git fsck

@golbiga commented on GitHub: @bernstei unfortunately we cannot replicate this issue. What happened when you followed this: `You can inspect what was checked out with 'git status' and retry with 'git restore --source=HEAD :/'` From what I can tell the `pack-4d226641dcff7c718a12db0e50551c0557cd0d85.pack` is corrupted, you can try removing it and doing a `git fetch` & `git fsck`
Author
Owner

@bernstei commented on GitHub:

OK, I had no idea it could lead to these sorts of git errors, but it appears to be a local filesystem issue. Sorry for the false alarm.

@bernstei commented on GitHub: OK, I had no idea it could lead to these sorts of git errors, but it appears to be a local filesystem issue. Sorry for the false alarm.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: usnistgov/macos_security#278