$ gh repo-export tinyfists test-1 test-2 test-3
Start migration for repositories: test-1 test-2 test-3
Monitoring migration 1704841 state: exporting
Monitoring migration 1704841 state: exporting
Monitoring migration 1704841 state: exporting
Monitoring migration 1704841 state: exported
Downloading migration 1704841 archive to migration_archive-1704841.tar.gz
A gh
extension to generate GitHub repository migrations.
- Download and install jq
gh extension install andyfeller/gh-repo-export
gh repo-export <organization> <repo> ...
- Profit! π° πΈ π€ πΈ π°
Note
gh-repo-export
requires the use of coarse-grained v1 PAT token withrepo
andadmin:org
scopes.
$ gh repo-export --help
Bulk exports a list of Git repositories from an organization
USAGE
gh-repo-export [options] <organization> <repo1> <repo2> ...
FLAGS
--archive=string Archive file (don't include the .tar.gz extension) (default: migration_archive-<migration_id>.tar.gz)
-d, --debug Enable debugging
--exclude-attachments Indicates attachments should be excluded from the migration
--exclude-git-data Indicates git data should be excluded from the migration
--exclude-metadata Indicates metadata should be excluded from the migration
--exclude-owner-projects Indicates projects owned by the organization or users should be excluded from the migration
--exclude-releases Indicates releases should be excluded from the migration
--hostname=string Hostname of the GitHub instance to authenticate with
--lock-repositories Indicates repositories should be locked (to prevent manipulation) while migrating data
Like any other gh
CLI extension, gh-repo-export
is trivial to install or upgrade and works on most operating systems:
-
Installation
gh extension install andyfeller/gh-repo-export
For more information:
gh extension install
-
Upgrade
gh extension upgrade gh-repo-export
For more information:
gh extension upgrade