Skip to content

GitLab でプロジェクトインポート機能を有効化する

GitLab では「他の Git サーバ」や「別の GitLab」からデータをインポートすることが出来ます。 Import and migrate groups and projects には以下の記載があります。 SaaS 版の GitLab ではインポート機能がデフォルトで有効化されているようですが、Self-Managed 版の場合は「デフォルトで無効」と書かれています。

The import sources that are available to you by default depend on which GitLab you use:

  • GitLab.com: all available import sources are enabled by default.
  • GitLab Self-Managed: no import sources are enabled by default and must be enabled.

GitLab can import projects from these supported import sources.

Import source Description
Bitbucket Cloud Using Bitbucket.org as an OmniAuth provider, import Bitbucket repositories.
Bitbucket Server Import repositories from Bitbucket Server (also known as Stash).
FogBugz Import FogBugz projects.
Gitea Import Gitea projects.
GitHub Import from either GitHub.com or GitHub Enterprise.
GitLab export Migrate projects one by one by using a GitLab export file.
Manifest file Upload a manifest file.
Repository by URL Provide a Git repository URL to create a new project from.

今回は Self-Managed 版で「インポート機能を有効化する」手順をメモします。

検証環境

対象 バージョン
Amazon Linux 2023.7.20250512
GitLab 18.0.0-ee.0

Self-Managed 版はデフォルトで「インポート機能が無効化」

Self-Managed 版では、デフォルト状態だと プロジェクト新しいプロジェクトプロジェクトのインポート を選択しても以下のように「利用可能なインポートオプションはありません」と表示され、インポート機能を利用出来ません。

image

インポート機能を有効化する

インポート機能を有効化します。

Step.1

GitLab へ管理ユーザでログインし、管理者 をクリックします。

image

Step.2

設定一般 をクリックします。

image

Step.3

設定のインポートとエクスポート 項目の ソースをインポート を確認すると、デフォルトでは全てのチェックが外れています。

image

今回は GitLab export にチェックを入れ、変更を保存 をクリックします。 これでインポート機能が有効化されました。

image

別の GitLab からエクスポートしたデータをインポートする

再度、プロジェクト新しいプロジェクトプロジェクトのインポート を選択します。 すると以下のように GitLab エクスポート という項目が増えていますので、これをクリックします。

image

GitLab からエクスポートしたデータをインポートするにはグループやプロジェクト名を指定します。

image