1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/k8scat-gigrator

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
README.md 2.2 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
gitlife-traslator Отправлено 30.11.2024 08:10 c67c872

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

  • Gitee
  • GitLab
  • GitHub
  • Gitea
  • Coding
  • Gogs
  • GF (腾讯工蜂)
  • Bitbucket

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

  • Requests

References

GitLab

  • GitLab API Docs
  • GitLab Create Repo
  • Project visibility level

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.

  • Introduction to GraphQL
  • GraphQL API Resources

GitHub REST API v3

  • GitHub Create Repo
  • GitHub Personal Access Token

GitHub GraphQL API v4

  • GraphQL resource limitations
  • Forming Calls with GraphQL

Gitee

  • Gitee OpenAPI
  • Gitee Personal Access Token

Gitea

  • Gitea API
  • Get a repo
  • Create a repo
  • List the repos that the authenticated user owns or has access to

Gogs

  • gogs/docs-api
  • Demo site

Coding

  • Open API

GF (腾讯工蜂)

  • Open API

GraphQL Client

  • sgqlc

License

MIT

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/k8scat-gigrator.git
git@api.gitlife.ru:oschina-mirror/k8scat-gigrator.git
oschina-mirror
k8scat-gigrator
k8scat-gigrator
master