Troubleshooting
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
When migrating to GitLab, you might encounter the following issues.
Imported repository is missing branches
If an imported repository does not contain all branches of the source repository:
- Set the environment variable
IMPORT_DEBUG=true. - Retry the import with a different group, subgroup, or project name.
- If some branches are still missing, inspect
importer.log(for example, withjq).
Exception: Error Importing repository - No such file or directory @ rb_sysopen - (filename)
The error occurs if you attempt to import a tar.gz file download of a repository’s source code.
Imports require a GitLab export file, not just a repository download file.
Diagnosing prolonged or failed imports
If you’re experiencing prolonged delays or failures with file-based imports, especially those using S3, the following may help identify the root cause of the problem:
Check import status
Check the import status:
- Use the GitLab API to check the import status of the affected project.
- Review the response for any error messages or status information, especially the
statusandimport_errorvalues. - Make note of the
correlation_idin the response, as it’s crucial for further troubleshooting.
Review logs
Search logs for relevant information:
For GitLab Self-Managed instances:
- Check the Sidekiq logs and
exceptions_jsonlogs. - Search for entries related to
RepositoryImportWorkerand the correlation ID from check import status. - Look for fields such as
job_status,interrupted_count, andexception.
For GitLab.com (GitLab team members only):
Use Kibana to search the Sidekiq logs with queries like:
Target:
pubsub-sidekiq-inf-gprd*json.class: "RepositoryImportWorker" AND json.correlation_id.keyword: "<CORRELATION_ID>"or
json.class: "RepositoryImportWorker" AND json.meta.project: "<project.full_path>"Look for the same fields as mentioned for GitLab Self-Managed instances.
Identify common issues
Check the information gathered in the review logs against the following common issues:
- Interrupted jobs: If you see a high
interrupted_countorjob_statusindicating failure, the import job may have been interrupted multiple times and placed in a dead queue. - S3 connectivity: For imports using S3, check for any S3-related error messages in the logs.
- Large repository: If the repository is very large, the import might time out. Consider using direct transfer in this case.
Support knowledge base
If you’re still having issues, see the GitLab Support knowledge base.