13 Star 118 Fork 24

K8sCat / Gigrator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Gigrator

GitHub Action 来了: action-mirror-git 镜像同步 Git 仓库

Git 代码仓批量迁移

gigrator.png

Start

git clone https://github.com/k8scat/gigrator.git
cd gigrator
pip3 install -r requirements.txt

# 迁移前需在配置文件(settings.py)中配置 SOURCE_GIT 和 DEST_GIT
# 配置参考: settings_example.py
python3 gigrator.py

Develop

# Base class
class Git:
    pass

# Other GitServer class should inherit Git
class OtherGit(Git):
    pass

Support

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

Environment

  • Git
  • Python

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

Dependencies

References

GitLab

GitLab GraphQL API

Can not create a project!

It will co-exist with the current v4 REST API. If we have a v5 API, this should be a compatibility layer on top of GraphQL.

GitHub REST API v3

GitHub GraphQL API v4

Gitee

Gitea

Gogs

Coding

GF (腾讯工蜂)

GraphQL Client

License

MIT

MIT License Copyright (c) 2020-2021 hsowan <hsowan.me@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Git 代码仓批量迁移,支持GitHub、Gitee、GitLab、Gitea、Coding、Gogs、腾讯工蜂 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/k8scat/gigrator.git
git@gitee.com:k8scat/gigrator.git
k8scat
gigrator
Gigrator
master

搜索帮助