ghbu: GitHub Backup
Design
Usage (backup the repositories owned by the user with the given GITHUB_TOKEN
to ~/github-backup, access by the given SSH key):
$ GITHUB_TOKEN=0123abc ghbu --to ~/github-backup --keyfile ~/.ssh/id_ed25519
Dependencies
git2: clone and fetch Git repositoriesreqwest: request repositories from GitHub APIserde_json: unmarshal GitHub API payloadsclap: parse command line arguments
TODO
- Concurrency
- interleave API calls with cloning/fetching of repositories
- Extension
- implement for GitLab API
- implement for Gitea API
- clone an organization's repositories, too