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:

  1. Set the environment variable IMPORT_DEBUG=true.
  2. Retry the import with a different group, subgroup, or project name.
  3. If some branches are still missing, inspect importer.log (for example, with jq).

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:

  1. Use the GitLab API to check the import status of the affected project.
  2. Review the response for any error messages or status information, especially the status and import_error values.
  3. Make note of the correlation_id in the response, as it’s crucial for further troubleshooting.

Review logs

Search logs for relevant information:

For GitLab Self-Managed instances:

  1. Check the Sidekiq logs and exceptions_json logs.
  2. Search for entries related to RepositoryImportWorker and the correlation ID from check import status.
  3. Look for fields such as job_status, interrupted_count, and exception.

For GitLab.com (GitLab team members only):

  1. 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>"
  2. 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_count or job_status indicating 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.