Mirrored project with LFS files returns Object does not exist on the server or you don't have permission to access it.
Summary
- Pull mirroring repositories between 2 GitLab instances, and clone the project from remote GitLab instance (mLTS enabled)
- After the mirroring is done, clone the repo and it returns LFS error with
Object does not exist on the server or you don't have permission to access it
error
@vyaklushin)
Reproduction steps (bySetup
- Create a new project (ProjectA)
- Clone this project locally
- Enable LFS tracking for .text files (
git lfs track '*.text'
) - Create a lfs.text file (
echo 'Test' > lfs.text
) - Add and commit new file
- Push file to the repository
- You should see LFS label next to it
Reproduction
- Create a new empty project (ProjectB)
- Setup pull mirroring for it
- Clone ProjectB locally
- You should see an error
Receiving objects: 100% (13/13), done.
Resolving deltas: 100% (1/1), done.
Downloading lfs.text (9 B)
Error downloading object: lfs.text (c418342): Smudge error: Error downloading lfs.text (c4183428d5cb2d6f86de19005bcd4643ac8e18284dcb641b5d8d075cc3ceb52f): [c4183428d5cb2d6f86de19005bcd4643ac8e18284dcb641b5d8d075cc3ceb52f] Object does not exist on the server or you don't have permissions to access it: [404] Object does not exist on the server or you don't have permissions to access it
Errors logged to '.../.git/lfs/logs/20230821T100647.784524.log'.
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: lfs.text: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
Root cause
I noticed that LfsObjectsProject
record for the new project was missing. Basically, we didn't link LFS files to ProjectB.
After I manually fixed it the in database, I was able to clone the repository without any problems.
Edited by Vasilii Iakliushin