相关文章推荐
Prerequisites
  • Import your GitHub repository into GitLab
  • Mirror a repository and share pipeline status
  • Improve the speed of imports on self-managed instances
  • Imported data
  • Import from GitHub Enterprise on an internal network
  • Automate group and project import
  • Troubleshooting
  • Import your project from GitHub to GitLab

    Introduced in GitLab 15.8, GitLab no longer automatically creates namespaces or groups that don’t exist. GitLab also no longer falls back to using the user’s personal namespace if the namespace or group name is taken.

    You can import your GitHub projects from either GitHub.com or GitHub Enterprise. Importing projects does not migrate or import any types of groups or organizations from GitHub to GitLab.

    The namespace is a user or group in GitLab, such as gitlab.com/sidney-jones or gitlab.com/customer-success . You can use bulk actions in the rails console to move projects to different namespaces.

    If you are importing to a self-managed GitLab instance, you can use the GitHub Rake task instead. This allows you to import projects without the constraints of a Sidekiq worker.

    When importing projects:

    • If a user referenced in the project is not found in the GitLab database, the project creator is set as the author and assignee. The project creator is usually the user that initiated the import process. A note on the issue mentioning the original GitHub author is added.
    • You can change the target namespace and target repository name before you import.
    • The importer also imports branches on forks of projects related to open pull requests. These branches are imported with a naming scheme similar to GH-SHA-username/pull-request-number/fork-name/branch . This may lead to a discrepancy in branches compared to those of the GitHub repository.

     
    推荐文章