'git lfs 404 error: decipher error message to deduce file name

I am moving several Git repositories that use LFS. I'm able to clone the repo into new system, then manually retrieve LFS files and upload. Command sequence is:

  1. Create the new repo. We used Azure ADO import, which worked OK, but it does not bring in the LFS files.

  2. Clone that new repo. Call that origin

  3. Manually get LFS files

    A. git remote add source URL_FOR_ORIGINAL_REPO

    B. git lfs fetch source --all

    C. git lfs push origin --all

All good, except

In one case, a few files are missing from the source server, most likely because of a user error in the past. Since users have come and gone, there's no guarantee we can find that user or their computer.

But I need to know what is missing. Here's how the problem looks. When we try to fetch, error is like this

$ git lfs fetch source --all
fetch: 490 object(s) found, done.
fetch: Fetching all references...
[24d6ffa33aa5a786b0f0d0f542c2660bc886b14ce15203ea78cf971e5447e8ca] LFS object not found: [404] LFS object not found
[4ffaa18643534971c53b3bf3e419d51ebb6735449ef745626e17f8521cf92fe6] LFS object not found: [404] LFS object not found
[575b9fb4521dc75e39ec2741b75486f2069cf6baf0d00338129bb2a6f6dfcbad] LFS object not found: [404] LFS object not found

How can I trace from this

[24d6ffa33aa5a786b0f0d0f542c2660bc886b14ce15203ea78cf971e5447e8ca] 

to the name of the branch and file that are missing from the repo?

It seems like there should have a simple answer, but I'm not finding any.

https://stackoverflow.com/a/35266717/1086346 : from 2016, suggests we run git lfs push --object-id origin 24d6ffa33aa5a786b0f0d0f542c2660bc886b14ce15203ea78cf971e5447e8ca but if I don't have the source file, how will this help?

https://github.com/git-lfs/git-lfs/issues/4099 : same problem, infeasible suggestions

https://stackoverflow.com/a/68591097/1086346 : doesn't explain how to get file path



Solution 1:[1]

This is how I got the file name in the same situation:

git lfs ls-files -a -l | grep 24d6ffa33aa5a786b0f0d0f542c2660bc886b14ce15203ea78cf971e5447e8ca

-a option lists all LFS files, not just those currently checked out. -l lists the full hash, not just the first 10 digits.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marko