GitHub import
Introduced in GitLab 9.1.
In order to retrieve and import GitHub repositories, you will need a GitHub personal access token. A username should be passed as the second argument to the Rake task which will become the owner of the project. You can resume an import with the same command.
Bear in mind that the syntax is very specific. Remove any spaces within the argument block and
before/after the brackets. Also, Some shells (e.g., zsh) can interpret the open/close brackets
([]
) separately. You may need to either escape the brackets or use double quotes.
Importing multiple projects
To import a project from the list of your GitHub projects available:
# Omnibus installations
sudo gitlab-rake "import:github[access_token,root,foo/bar]"
# Installations from source
bundle exec rake "import:github[access_token,root,foo/bar]" RAILS_ENV=production
In this case, access_token
is your GitHub personal access token, root
is your GitLab username, and foo/bar
is the new GitLab namespace/project that
will get created from your GitHub project. Subgroups are also possible: foo/foo/bar
.
Importing a single project
To import a specific GitHub project (named foo/github_repo
here):
# Omnibus installations
sudo gitlab-rake "import:github[access_token,root,foo/bar,foo/github_repo]"
# Installations from source
bundle exec rake "import:github[access_token,root,foo/bar,foo/github_repo]" RAILS_ENV=production
Help and feedback
If there's something you don't like about this feature
To propose functionality that GitLab does not yet offer
To further help GitLab in shaping new features
If you didn't find what you were looking for
If you want help with something very specific to your use case, and can use some community support
POST ON GITLAB FORUM
If you have problems setting up or using this feature (depending on your GitLab subscription)
REQUEST SUPPORT
To view all GitLab tiers and features or to upgrade
If you want to try all features available in GitLab.com
If you want to try all features available in GitLab self-managed
If you spot an error or a need for improvement and would like to fix it yourself in a merge request
EDIT THIS PAGE
If you would like to suggest an improvement to this doc