A script to backup / mirror GitHub repositories.
Get yourself a personal access token on GitHub that has the repo
scope.
Config file in ~/.config/gitbackhub/config.ini
.
[main]
user = GitHubUserName
access_token = AccessToken
directory = /path/to/target/directory
[user:GitHubUserName]
[user:AnotherGitHubUserName]
[org:GitHubOrgName]
[org:AnotherGitHubOrgName]
[repo:SomeGitHubUser/some-repo]
[repo:YetAnotherGitHubUserName/another-repo]
[repo:YetAnotherGitHubOrgName/yet-another-repo]
Make sure the file is not readable by anybody but yourself since it contains your GitHub token.
$ gitbackhub --help
Usage: gitbackhub [OPTIONS]
Options:
--access-token TEXT
--user TEXT
--directory DIRECTORY The data directory to clone to
--config PATH
--help Show this message and exit.