Git fetcher 
[!NOTE]
WIP: this tool is usable but its API may change in breaking ways.
A lightweight CLI to create local copies of remote repositories.
Highlights:
- Simple file-based configuration
gitweb-compatible local repositories
- Automation-friendly, including secret handling
Quickstart
go install github.com/mtth/gitfetcher
Sample .gitfetcher.conf configuration (txtpb format):
# Sync public repositories from their URL.
sources { from_url { url: "https://github.com/golang/go" }}
sources { from_url { url: "https://github.com/nodejs/node" }}
# Sync repositories available to a given GitHub authentication token. This is
# useful for example to sync all your personal repos.
sources {
from_github_token {
# A token with read access to repositories is required. It can either be
# specified inline or via an environment variable (prefixing it with `$`).
token: "$GITHUB_TOKEN"
# Forks are excluded by default and can be included using via this option.
# include_forks: true
# It's also possible to filter by repository name by specifying one or
# more filters, optionally including wildcards. A repository will be
# synced if it matches at least one.
# filters: "user/*"
# filters: "user/prefix*"
}
}
# More sources...
# Optional settings
options {
# Path to root folder where local repositories will be stored, relative to the
# configuration file. Defaults to the configuration's enclosing directory.
# root: "/path/to/.gitfetcher"
}
Then run gitfetcher sync in the folder containing the above configuration.
See gitfetcher --help for the full list of available commands and options.