From e5a8160e85dc72028c6463e77081493c68970868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Fri, 16 Dec 2016 11:38:21 +0100 Subject: Add doc for the Gitea importer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- doc/workflow/importing/README.md | 2 +- .../img/import_projects_from_gitea_new_import.png | Bin 0 -> 27805 bytes ...import_projects_from_gitea_new_project_page.png | Bin 0 -> 52976 bytes .../importing/import_projects_from_gitea.md | 80 +++++++++++++++++++++ .../importing/import_projects_from_github.md | 8 +-- 5 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 doc/workflow/importing/img/import_projects_from_gitea_new_import.png create mode 100644 doc/workflow/importing/img/import_projects_from_gitea_new_project_page.png create mode 100644 doc/workflow/importing/import_projects_from_gitea.md diff --git a/doc/workflow/importing/README.md b/doc/workflow/importing/README.md index 18e5d950866..2d91bee0e94 100644 --- a/doc/workflow/importing/README.md +++ b/doc/workflow/importing/README.md @@ -4,6 +4,7 @@ 1. [GitHub](import_projects_from_github.md) 1. [GitLab.com](import_projects_from_gitlab_com.md) 1. [FogBugz](import_projects_from_fogbugz.md) +1. [Gitea](import_projects_from_gitea.md) 1. [SVN](migrating_from_svn.md) In addition to the specific migration documentation above, you can import any @@ -14,4 +15,3 @@ repository is too large the import can timeout. You can copy your repos by changing the remote and pushing to the new server; but issues and merge requests can't be imported. - diff --git a/doc/workflow/importing/img/import_projects_from_gitea_new_import.png b/doc/workflow/importing/img/import_projects_from_gitea_new_import.png new file mode 100644 index 00000000000..8d76abf102b Binary files /dev/null and b/doc/workflow/importing/img/import_projects_from_gitea_new_import.png differ diff --git a/doc/workflow/importing/img/import_projects_from_gitea_new_project_page.png b/doc/workflow/importing/img/import_projects_from_gitea_new_project_page.png new file mode 100644 index 00000000000..91dcf5a6c02 Binary files /dev/null and b/doc/workflow/importing/img/import_projects_from_gitea_new_project_page.png differ diff --git a/doc/workflow/importing/import_projects_from_gitea.md b/doc/workflow/importing/import_projects_from_gitea.md new file mode 100644 index 00000000000..f14f8806d8d --- /dev/null +++ b/doc/workflow/importing/import_projects_from_gitea.md @@ -0,0 +1,80 @@ +# Import your project from Gitea to GitLab + +Import your projects from Gitea to GitLab with minimal effort. + +## Overview + +>**Note:** +As of Gitea `v1.0.0`, issue & pull-request comments cannot be imported! This is +a [known issue][issue-401] that should be fixed in a near-future. + +- At its current state, Gitea importer can import: + - the repository description (GitLab 8.15+) + - the Git repository data (GitLab 8.15+) + - the issues (GitLab 8.15+) + - the pull requests (GitLab 8.15+) + - the milestones (GitLab 8.15+) + - the labels (GitLab 8.15+) +- Repository public access is retained. If a repository is private in Gitea + it will be created as private in GitLab as well. + +## How it works + +Since Gitea is currently not an OAuth provider, author/assignee cannot be mapped +to users in your GitLab's instance. This means that the project creator (most of +the times the current user that started the import process) is set as the author, +but a reference on the issue about the original Gitea author is kept. + +The importer will create any new namespaces (groups) if they don't exist or in +the case the namespace is taken, the repository will be imported under the user's +namespace that started the import process. + +## Importing your Gitea repositories + +The importer page is visible when you create a new project. + +![New project page on GitLab](img/import_projects_from_gitea_new_project_page.png) + +Click on the **Gitea** link and the import authorization process will start. + +![New Gitea project import](img/import_projects_from_gitea_new_import.png) + +### Authorize access to your repositories using a personal access token + +With this method, you will perform a one-off authorization with Gitea to grant +GitLab access your repositories: + +1. Go to (replace + `you-gitea-instance` with the host of your Gitea instance). +1. Click **Generate New Token**. +1. Enter a token description. +1. Click **Generate Token**. +1. Copy the token hash. +1. Go back to GitLab and provide the token to the Gitea importer. +1. Hit the **List Your Gitea Repositories** button and wait while GitLab reads + your repositories' information. Once done, you'll be taken to the importer + page to select the repositories to import. + +### Select which repositories to import + +After you've authorized access to your Gitea repositories, you will be +redirected to the Gitea importer page. + +From there, you can see the import statuses of your Gitea repositories. + +- Those that are being imported will show a _started_ status, +- those already successfully imported will be green with a _done_ status, +- whereas those that are not yet imported will have an **Import** button on the + right side of the table. + +If you want, you can import all your Gitea projects in one go by hitting +**Import all projects** in the upper left corner. + +![Gitea importer page](img/import_projects_from_github_importer.png) + +--- + +You can also choose a different name for the project and a different namespace, +if you have the privileges to do so. + +[issue-401]: https://github.com/go-gitea/gitea/issues/401 diff --git a/doc/workflow/importing/import_projects_from_github.md b/doc/workflow/importing/import_projects_from_github.md index b3660aa8030..86a016fc6d6 100644 --- a/doc/workflow/importing/import_projects_from_github.md +++ b/doc/workflow/importing/import_projects_from_github.md @@ -6,8 +6,9 @@ Import your projects from GitHub to GitLab with minimal effort. >**Note:** If you are an administrator you can enable the [GitHub integration][gh-import] -in your GitLab instance sitewide. This configuration is optional, users will be -able import their GitHub repositories with a [personal access token][gh-token]. +in your GitLab instance sitewide. This configuration is optional, users will +still be able to import their GitHub repositories with a +[personal access token][gh-token]. - At its current state, GitHub importer can import: - the repository description (GitLab 7.7+) @@ -85,7 +86,7 @@ authorization with GitHub to grant GitLab access your repositories: 1. Click **Generate token**. 1. Copy the token hash. 1. Go back to GitLab and provide the token to the GitHub importer. -1. Hit the **List your GitHub repositories** button and wait while GitLab reads +1. Hit the **List Your GitHub Repositories** button and wait while GitLab reads your repositories' information. Once done, you'll be taken to the importer page to select the repositories to import. @@ -112,7 +113,6 @@ You can also choose a different name for the project and a different namespace, if you have the privileges to do so. [gh-import]: ../../integration/github.md "GitHub integration" -[new-project]: ../../gitlab-basics/create-project.md "How to create a new project in GitLab" [gh-integration]: #authorize-access-to-your-repositories-using-the-github-integration [gh-token]: #authorize-access-to-your-repositories-using-a-personal-access-token [social sign-in]: ../../profile/account/social_sign_in.md -- cgit v1.2.1 From 7f963fcde2cfe577173e91fe08b14ec08ef93dd5 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 16 Dec 2016 16:24:08 +0100 Subject: Remove duplicate image and optimize the remaining one --- .../img/import_projects_from_gitea_new_import.png | Bin 27805 -> 15561 bytes .../import_projects_from_gitea_new_project_page.png | Bin 52976 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 doc/workflow/importing/img/import_projects_from_gitea_new_project_page.png diff --git a/doc/workflow/importing/img/import_projects_from_gitea_new_import.png b/doc/workflow/importing/img/import_projects_from_gitea_new_import.png index 8d76abf102b..a3f603cbd0a 100644 Binary files a/doc/workflow/importing/img/import_projects_from_gitea_new_import.png and b/doc/workflow/importing/img/import_projects_from_gitea_new_import.png differ diff --git a/doc/workflow/importing/img/import_projects_from_gitea_new_project_page.png b/doc/workflow/importing/img/import_projects_from_gitea_new_project_page.png deleted file mode 100644 index 91dcf5a6c02..00000000000 Binary files a/doc/workflow/importing/img/import_projects_from_gitea_new_project_page.png and /dev/null differ -- cgit v1.2.1 From f5d456c87e36829f0a17ecfbbd7b205f2e5ad834 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 16 Dec 2016 16:25:53 +0100 Subject: Fix link to img --- doc/workflow/importing/import_projects_from_gitea.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/workflow/importing/import_projects_from_gitea.md b/doc/workflow/importing/import_projects_from_gitea.md index f14f8806d8d..936cee89f45 100644 --- a/doc/workflow/importing/import_projects_from_gitea.md +++ b/doc/workflow/importing/import_projects_from_gitea.md @@ -33,7 +33,7 @@ namespace that started the import process. The importer page is visible when you create a new project. -![New project page on GitLab](img/import_projects_from_gitea_new_project_page.png) +![New project page on GitLab](img/import_projects_from_new_project_page.png) Click on the **Gitea** link and the import authorization process will start. -- cgit v1.2.1