GitLab LFS files missing after the repository is imported from an exported file
Summary
gitlab LFS files missing after the repository is imported from an exported file
Steps to reproduce
I want to migrate a gitlab repository that contains LFS files from gitlab server A to gitlab server B.
Here're the steps I've done:
- Click Settings -> General -> Export project in the repository at gitlab server A. Then download the exported file
repo.tar.gz
. - Create a new repository in server B using
repo.tar.gz
file.
The problem I have with the above steps is that I can't download the LFS files in server B.
When I click the download button of one of the LFS files, I get a 404 Page Not Found error.
Is this a bug of gitlab?
My gitlab version is 12.5.2.
I can successfully download the LFS files in server A.
If I use git clone https://...
to download the repository at server B, I get the following error:
Cloning into 'repo-at-server-b'...
remote: Enumerating objects: 248971, done.
remote: Counting objects: 100% (248971/248971), done.
remote: Compressing objects: 100% (163634/163634), done.
remote: Total 248971 (delta 61741), reused 248971 (delta 61741)
Receiving objects: 100% (248971/248971), 1.60 GiB | 42.92 MiB/s, done.
Resolving deltas: 100% (61741/61741), done.
Checking out files: 100% (226626/226626), done.
Downloading lfs_files/art.tar.xz (7.0 MB)
Error downloading object: lfs_files/art.tar.xz (b0d6758): Smudge error: Error downloading lfs_files/art.tar.xz (b0d67582c9a992b4f8a01fdde0f96999385435b98763251e64520e263e76ac0d): [b0d67582c9a992b4f8a01fdde0f96999385435b98763251e64520e263e76ac0d] 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 /data-disk/debug_git_lfs/repo-at-server-b/.git/lfs/logs/20210220T110106.03414397.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: lfs_files/art.tar.xz: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
It looks like that something went wrong when exporting the repository from server A, or when importing into server B.
I've tried the answer in this post, but fail at git lfs pull
command.
The error message I get from git lfs pull
is [c889004e16f35973ac3d695f7939e388060c425fd98d708e5076aefb67q15065] 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
Example Project
What is the current bug behavior?
The LFS file at gitlab server B is not found.
What is the expected correct behavior?
I should be able to download LFS files from gitlab server B.
Relevant logs and/or screenshots
Cloning into 'repo-at-server-b'...
remote: Enumerating objects: 248971, done.
remote: Counting objects: 100% (248971/248971), done.
remote: Compressing objects: 100% (163634/163634), done.
remote: Total 248971 (delta 61741), reused 248971 (delta 61741)
Receiving objects: 100% (248971/248971), 1.60 GiB | 42.92 MiB/s, done.
Resolving deltas: 100% (61741/61741), done.
Checking out files: 100% (226626/226626), done.
Downloading lfs_files/art.tar.xz (7.0 MB)
Error downloading object: lfs_files/art.tar.xz (b0d6758): Smudge error: Error downloading lfs_files/art.tar.xz (b0d67582c9a992b4f8a01fdde0f96999385435b98763251e64520e263e76ac0d): [b0d67582c9a992b4f8a01fdde0f96999385435b98763251e64520e263e76ac0d] 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 /data-disk/debug_git_lfs/repo-at-server-b/.git/lfs/logs/20210220T110106.03414397.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: lfs_files/art.tar.xz: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
Output of checks
Results of GitLab environment info
Gem Version: 3.0.3
Bundler Version:1.17.3
Rake Version: 12.3.3
Redis Version: 4.0.9
Git Version: 2.24.0
Sidekiq Version:5.2.7
Go Version: unknown
GitLab information
Version: 12.5.2
Revision: 49482945d28
Directory: /home/git/gitlab
DB Adapter: PostgreSQL
DB Version: 10.9
URL: https://gitlab.mycompany.com
HTTP Clone URL: https://gitlab.mycompany.com/some-group/some-project.git
SSH Clone URL: ssh://git@gitlab.mycompany.com:10022/some-group/some-project.git
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 10.2.0
Repository storage paths:
- default: /home/git/data/repositories
GitLab Shell path: /home/git/gitlab-shell
Git: /usr/bin/git
Results of GitLab application Check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 10.2.0 ? ... OK (10.2.0)
Running /home/git/gitlab-shell/bin/check
Internal API available: OK
Redis available via internal API: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... Server: ldapmain
LDAP authentication... Success
LDAP users with access to your GitLab server (only showing the first 100 results)
User output sanitized. Found 77 users of 100 limit.
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
Projects have namespace: ...
43/25 ... yes
17/26 ... yes
43/27 ... yes
43/30 ... yes
17/31 ... yes
43/65 ... yes
43/66 ... yes
...
115/592 ... yes
66/593 ... yes
41/594 ... yes
43/595 ... yes
43/596 ... yes
43/597 ... yes
43/598 ... yes
41/599 ... yes
43/600 ... yes
43/601 ... yes
43/602 ... yes
133/603 ... yes
178/610 ... yes
178/611 ... yes
5/612 ... yes
43/613 ... yes
43/614 ... yes
43/615 ... yes
43/616 ... yes
19/617 ... yes
41/618 ... yes
43/619 ... yes
24/620 ... yes
181/621 ... yes
142/623 ... yes
43/624 ... yes
43/625 ... yes
43/626 ... yes
25/627 ... yes
43/628 ... yes
151/629 ... yes
43/631 ... yes
43/632 ... yes
43/633 ... yes
148/634 ... yes
43/635 ... yes
43/636 ... yes
43/637 ... yes
43/638 ... yes
43/639 ... yes
151/640 ... yes
43/641 ... yes
141/642 ... yes
151/643 ... yes
43/644 ... yes
28/645 ... yes
61/646 ... yes
43/647 ... yes
43/648 ... yes
43/649 ... yes
43/650 ... yes
43/651 ... yes
19/652 ... yes
43/653 ... yes
43/654 ... yes
147/655 ... yes
141/657 ... yes
43/658 ... yes
5/659 ... yes
148/660 ... yes
142/661 ... yes
61/663 ... yes
61/664 ... yes
113/665 ... yes
43/666 ... yes
61/668 ... yes
12/669 ... yes
141/670 ... yes
43/671 ... yes
207/672 ... yes
19/673 ... yes
61/675 ... yes
61/676 ... yes
61/677 ... yes
61/678 ... yes
61/679 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.5.3 ? ... yes (2.6.5)
Git version >= 2.22.0 ? ... yes (2.24.0)
Git user has default SSH configuration? ... yes
Active users: ... 59
Is authorized keys file accessible? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished