Importing git bundle into gitlab

1.9k views Asked by At

I've created a git bundle out of my repo and I'm trying to import it to gitlab. I've tried the API via curl command which gives me the error Error importing repository into root/api-project - No such file or directory @ rb_sysopen - [FILTERED] and I've tried using the gitlab-rake and when I add --trace the only output is

** Invoke gitlab:import:repos (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab:import:repos

Is there a better way to import a git bundle (.bundle file) into gitlab? And if not then what can I do to fix the import or at least get a better output log from the gitlab-rake command?

1

There are 1 answers

0
VonC On

2020: Instead of using a git bundle, you could follow "Import your project from GitHub to GitLab" and use the GitHub importer (GitLab 10.2 and more)

Using the importer, you can import your GitHub repositories to GitLab.com or to your self-managed GitLab instance.

References to pull requests and issues are preserved (GitLab.com & 8.7+), and each imported repository maintains visibility level unless that visibility level is restricted, in which case it defaults to the default project visibility.


See GitLab 16.2 (July 2023)

Speed up imports from GitHub using multiple access tokens

By default, the GitHub importer uses a single access token when importing projects from GitHub to GitLab. An access token for a user account is typically rate limited to 5000 requests per hour. This can significantly reduce the speed of the importer when:

  • Importing multiple small to medium sized projects.
  • Importing a single massive project with a lot of data.

With this release, you can pass a list of access tokens to the GitHub importer API so that the API can rotate through them when rate limited. When using multiple access tokens:

  • The tokens cannot be from the same account because they would all share one rate limit.
  • Tokens must have the same permissions and sufficient privileges to the repositories to import.

See Documentation and Issue.