Mirror Github¶ ↑
This script will cycle through all repositories belonging to an organization and clone a mirror of them to a specified directory.
A mirror is a bare repository that is suitable for future cloning, if necessary.
Installation¶ ↑
gem install mirror_github
Create a mirror_github_config.yml that contains your GitHub username, password, and organization name. There is a config_example.yml file that demonstrates the structure. It will look something like this:
github: username: johnnytest password: sOOperSecret org: my_orgs_github_account_name
Obviously, the user credentials you define in this file need to have access to the specified organization.
Note: you can [create a personal token](github.com/blog/1509-personal-api-tokens) instead of using your username and password. Use it for your username and leave password blank.
Then:
mirror_github --config-file=/path/to/your/mirror_github_config.yml --backup-dir=/path/to/github/mirror/directory