Manual Page Search Parameters

GITHUB-MIRROR(1) General Commands Manual GITHUB-MIRROR(1)

github-mirrorCreate archives for git tags

github-mirror [-a archivefile] [-p pubfile] [-t pat] [repo ...]

The github-mirror utility mirrors bare git repositories to GitHub. GitHub repositories are created/updated with the description pulled from the bare repository's description file and are set to public if pubfile exists. If present, the homepage is set to the contents of the homepage file. Repositories are then pushed in mirror mode.

github-mirror must be authenticated to GitHub by setting GH_TOKEN or using the -t option. The token must allow read access to "metadata" and read/write access to "administration".

The following options are available:

archivefile
If archivefile is present, mark the repository as archived on GitHub. Default is archived.
pubfile
Specify the file that determines if the repository is public or not. Default is git-daemon-export-ok.
pat
Set the GitHub PAT token. Required if GH_TOKEN isn't set.

The github-mirror utility exits 0 on success, and >0 if an error occurs.

Mirror all the git repositories under /var/git to GitHub:

$ github-mirror -t $(cat gh_token) /var/git/*

gitsrv(1), gh(1)

Jacob R. Edwards <jacob@jacobedwards.org>

March 16, 2026 jacob