Skip to main content

Gigrator

Gigrator 是一个 Git 代码仓批量迁移工具,支持众多流行的代码托管平台,包括 GitHub、码云(Gitee)、GitLab、Gitea、Coding、Gogs、腾讯工蜂,同时可以基于本项目进行拓展其他代码托管平台。

支持的平台

说明:

  • 暂不支持迁移至 Coding,可从 Coding 迁移至其他 Git 服务器
  • 由于 Coding 的升级,其基础 API 不再是 https://coding.net,而改为: https://{username}.coding.net
  • 迁移前请确认已在Git服务器上添加 SSH Key
  • 只能迁移指定用户下的仓库,即 {username}/{repo_name},不包括参与的或者组织的仓库
  • 迁移包括commits、branches和tags,不包括issues、pr和wiki

安装

pip 安装

pip install gigrator

源码安装

git clone https://github.com/k8scat/gigrator.git
cd gigrator
make

使用

环境要求

  • Git
  • Python3

配置文件

参考 config.yml

运行

gigrator -c config.yml

扩展更多平台

基于 Git 类实现其他平台的代码仓迁移

class Git:
    def list_repos(self) -> list:
        raise NotImplementedError

    def create_repo(self, name: str, desc: str, is_private: bool) -> bool:
        raise NotImplementedError

    def is_repo_existed(self, repo_name: str) -> bool:
        raise NotImplementedError

贡献

Note:

  • 不支持迁移至 Coding, 可从 Coding 迁移至其他 Git 服务器
  • 由于 Coding 的升级, 其基础 API 不再是 https://coding.net, 而改为: https://{username}.coding.net
  • 迁移前请确认已在Git服务器上添加 SSH Key
  • 只能迁移指定用户下的仓库, 即 {username}/{repo_name}, 不包括参与的或者组织的仓库
  • 迁移包括commits、branches和tags, 不包括issues、pr和wiki

环境

  • Git
  • Python

开发环境: git version 2.20.1 (Apple Git-117) + Python 3.7.2

开发手册

开发手册

开源协议

MIT

Metadata

Release files for gigrator 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gigrator 0.1.0
File Size Uploaded
gigrator-0.1.0.tar.gz 10.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gigrator 0.1.0
File Interpreter ABI Platform
gigrator-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.0 kB

Release files / gigrator-0.1.0.tar.gz

Download URL gigrator-0.1.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2b45b62ba8c9fca7f3ae0794a2b2b96631d4947f768e68970a6354b4c6156bf6
BLAKE2b-256 checksum
How to use checksums
d93e88be37e530ec710f8d47dc13ae5251aac876b53148aa5709f5f0e67a165f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release files / gigrator-0.1.0-py3-none-any.whl

Download URL gigrator-0.1.0-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
201f84fbc29cfc9aabebf5dce0ddcb30813014b578fec3b5e053457bd16606b6
BLAKE2b-256 checksum
How to use checksums
d87465af148997150ed2ca67a7f490645fd0c9e483175f6aaec6f6a32da162bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page