1 Star 0 Fork 24

equalll / Gigrator

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

Gigrator

Migrate repos from one GitServer to another. Git仓库迁移助手

Todo

支持

  • GitLab
  • GitHub
  • 码云
  • Gitea
  • Gogs

注:

  • 目前只能迁移指定用户下的仓库, 即:username/:repo, 不包括参与的或者组织的仓库
  • 迁移包括commits、branches和tags, 不包括issues、pr和wiki
  • 影响迁移速度的因素: Git服务器带宽、本地网速

基础环境

  • Git
  • Python

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

配置

不同Git服务器需要有以下四个属性配置:

  • API 前缀
  • 授权令牌
  • 用户名
  • SSH 前缀

参考配置: config.py

使用

# 安装 pipenv
pip install --user pipenv

git clone git@github.com:hsowan/Gigrator.git
cd gigrator

# 初始化环境
pipenv --python 3
pipenv install

pipenv run python gigrator.py

思路

  1. 提供源Git服务器和目的Git服务器
  2. 列出在源Git服务器的所有仓库
  3. 选择需要迁移的仓库
  4. 向目的Git服务器迁移所选仓库:
    1. 检查目的Git服务器是否有同名仓库
    2. 拉取源Git服务器的仓库
    3. 在目的Git服务器创建仓库
    4. 向目的Git服务器推送仓库

Packages

Docs

GitLab

GitHub

码云

Gitea

Gogs

License

MIT

MIT License Copyright (c) 2019 hsowan 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 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

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

搜索帮助