LFS objects 404
after importing an exported project
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When importing an GitLab self-managed exported project
in gitlab.com, the project's LFS objects are returning a 404
error:
Error downloading object: assets/images/ansvarsrett.png (aea3818): Smudge error: Error downloading assets/images/ansvarsrett.png (aea38187fdde2e38ac8f674d6990bb52f64479c51dd43e9f7e5922e7f92b4a3d): [aea38187fdde2e38ac8f674d6990bb52f64479c51dd43e9f7e5922e7f92b4a3d] 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
Steps to reproduce
This is happening on 1
project for one particular customer of ours. See the customer's ZD ticket (Internal to GitLab only)
Their process is the following:
- Export project from our self-managed instance.
- Download .tar.gz archive.
- Create new GitLab.com project, and choose import project.
- Select GitLab
exportimport and choose our downloaded archive. - Wait for process to complete.
Example Project
https://gitlab.com/pid-solutions/pid-solutions-website/-/blob/master/assets/images/ansvarsrett.png
Note: this is a private project
What is the current bug behavior?
LFS object returns 404
What is the expected correct behavior?
LFS object does not return 404
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Workaround
we worked around this by changing origin-remote on a checkout from our old GitLab instance, and re-pushing all lfs objects (git lfs push origin master --all) go the repository on gitlab.com.