@pghalliday/mirror-repos
v1.0.6
Published
Mirror repositories from a github account
Downloads
5
Readme
mirror-repos
Script to mirror all repos from a github account.
Usage
- install with
npm install -g @pghalliday/mirror-repos
- Add an SSH key for your current user to your GitHub account
- Create a GitHub Personal Access Token with
read:user
andread:org
scopes. - Create a
config.json
file with the following contents:
{
"outputDirectory": "output",
"logFile": "mirror-repos.log",
"logLevel": "info",
"gitBinary": "git",
"strictHostKeyChecking": true,
"github": {
"graphQLEndpoint": "https://api.github.com/graphql",
"sshEndpoint": "[email protected]",
"personalAccessToken": "YOUR_PERSONAL_ACCESS_TOKEN"
}
}
- Run from the same directory as
config.json
with:
mirror-repos
- Or run using a config file from a different location with:
mirror-repos <PATH_TO_CONFIG>