This script:
- forks and clones all MongoDB documentation repos, and
- sets the upstream appropriately for each cloned fork.
It is designed to:
- speed up the onboarding process for new writers with MongoDB, and
- simplify migrating a writer's workload to a new physical or virtual machine.
Before you get started running the script, you must set up the Github CLI.
You can do this by following these installation instructions: https://github.com/cli/cli#installation
To clone your forks to a new machine:
-
On the machine to which you want to clone your forks, generate an SSH key.
-
Clone this repository.
-
Navigate to the directory into which you wish to clone your forks.
-
Run the
clone-mdb-docs-repos.py
script. Pass your GitHub username and desired location of the repos as arguments:python3 path/to/clone-mdb-docs-repo/clone-mdb-docs-repos.py jwilliams-mongo /Users/jwilliams/projects/
When the script completes, it returns a list of repositories that it did not clone because:
- You have not forked them, or
- You have already cloned them.
If all repos appear in the repos not cloned because you need to fork
list, ensure that you've added the correct SSH key to your Github account.