跳到内容
SIAX
此语言版本是机器辅助翻译的草稿,尚未经过审核,不会被搜索引擎索引。 阅读经过审核的英文版本
迁移未审核

Migrate repositories from GitHub to Gitea

从 GitHub 到 Gitea

Move repositories from GitHub to a self-hosted Gitea with Gitea's built-in migration form, then point your local clones at the new remote. Based on the Gitea documentation.

尚未翻译:以英文显示。

本指南尚未经人工审核。在依赖它之前,请对照所链接的文档检查每一步。它不会被搜索引擎收录。审核说明: Written by an agent from the cited documentation; the exact fields of the migration form vary by Gitea version and were not checked on a live instance. Needs a person to run a test migration and review.

核实于

核对所依据的版本

  • Gitea documentation: repository migration: unpinned (current docs on 2026-10-29) [gitea-migration]
  • git remote set-url: unpinned (current git documentation) [git-remote]

开始之前

  • A running Gitea instance and an account on it that may create repositories.
  • Read access to the GitHub repositories you want to move.

Plan what moves

Git history moves with any migration. Gitea's documentation says that to migrate items such as issues and pull requests from GitHub you need to enter at least your username in the migration form. List the repositories and decide per repository whether those items should come along.[gitea-migration]

The old standalone tool gitea/migrator is archived; its README points to the "New migration" menu in Gitea instead.[migrator]

Run the migration in Gitea

  1. In Gitea, open the "New migration" menu and choose GitHub as the source.
  2. Enter the repository's clone URL and the credentials the form asks for (at least your username if issues and pull requests should come along).
  3. Select the items to migrate and the owner and name of the new repository, then start the migration.
  4. When it has finished, compare branches, tags and a sample of issues with the GitHub original.
[gitea-migration][migrator]

Point local clones at Gitea

git remote set-url origin <newurl>
Replace <newurl> with the clone URL Gitea shows for the new repository. 来源:git-remote documentation

本指南未涵盖

  • CI pipelines (GitHub Actions workflows) and their secrets: check how your Gitea instance runs CI before switching.
  • Integrations, webhooks and apps installed on the GitHub organisation.
  • Installing and hardening Gitea itself (see the Gitea hardening guide).

来源

浏览完整网站 · Svenska