Coder Social home page Coder Social logo

k8scat / gigrator Goto Github PK

View Code? Open in Web Editor NEW
46.0 2.0 9.0 1.77 MB

Git repos migration tool which supports Github / Gitee / Gitlab / Gitea / Coding / Gogs / 腾讯工蜂.

Home Page: https://github.com/k8scat/gigrator

License: MIT License

Python 100.00%
git github gitee gitea coding gogs gitlab migrate golang cmd

gigrator's Introduction

Gigrator

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

Gigrator 是一个 Git 代码仓批量迁移工具,支持多种 Git 平台,包括 Gitee、GitLab、GitHub、Gitea、Coding、Gogs 和腾讯工蜂,同时支持自行扩展更多 Git 平台。

gigrator.png

快速开始

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

支持平台

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

交流群

交流群

二维码失效可添加微信 「kennn007」,请备注「Gigrator」。

gigrator's People

Contributors

afghanistanyn avatar crazyzfp avatar fumeboy avatar k8scat avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gigrator's Issues

多谢提供代码,改改还是能用的

刚好需要用到,gitlab 8.11 迁移到 gitlab 12.5 ,而8.11 的api地址是api/v3/projects ,所以改改新增一个type。
项目需要用到 requests 包,可pip安装,要把config.py改成private.py才可以正常引用,其实gitlab to gitlab是可以支持发现组内项目迁移的,迁移后只能自己手动分组了,也可以改下代码自动创建组并推送。

# 检查本地是否存在repo, 存在则删除
repo_dir = clone_space + repo_name + '.git'
clone_cmd = 'cd ' + clone_space + ' && git clone --bare ' + repo_url
-----------
repo_url = repo['ssh_url_to_repo']
repo_dir = clone_repo(source, repo_name, repo_url)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.