Skip to content

A tool for dumping hosted git repositories to local in batch.

License

Notifications You must be signed in to change notification settings

yankeguo/gitdump

Repository files navigation

gitdump

workflow badge Go Reference

A tool for dumping hosted git repositories to local in batch.

Features

  • supported git hosting platforms
    • github
    • gitee
    • gitea
    • coding

中文使用说明

Usage

Command

./gitdump -conf config.yaml

Configuration

dir: repos
concurrency: 3
accounts:
  - vendor: github
    # username, github username
    username: USERNAME
    # password, github personal token
    password: PERSONAL_TOKEN
  - vendor: gitee
    # username, gitee username
    username: USERNAME
    # password, gitee personal token
    password: PERSONAL_TOKEN
  - vendor: gitea
    # url, url of gitea instance
    url: https://your.gitea.com
    # username, gitea username
    username: USERNAME
    # password, gitea personal token
    password: PERSONAL_TOKEN
  - vendor: coding
    # url, url of coding instance
    url: https://your.coding.net
    # username, personal token username, displayed in token page, NOT YOUR CODING USERNAME
    username: TOKEN_USERNAME
    # password, personal token
    password: TOKEN

Container Image

Check GitHub Packages for available container images

Check Dockerfile for details

By default, container image will execute gitdump every 6 hours

All you need to do is to mount /data for data persistence, and put a config.yaml at /data/config.yaml

Notification

Execution result will be delivered to environment variable $NOTIFY_URL, if given, by HTTP POST.

{"text": "MESSAGE..."}

Credits

GUO YANKE, MIT License