1.0.6 • Published 4 years ago
@pghalliday/mirror-repos v1.0.6
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:userandread:orgscopes. - Create a
config.jsonfile with the following contents:
{
"outputDirectory": "output",
"logFile": "mirror-repos.log",
"logLevel": "info",
"gitBinary": "git",
"strictHostKeyChecking": true,
"github": {
"graphQLEndpoint": "https://api.github.com/graphql",
"sshEndpoint": "git@github.com",
"personalAccessToken": "YOUR_PERSONAL_ACCESS_TOKEN"
}
}- Run from the same directory as
config.jsonwith:
mirror-repos- Or run using a config file from a different location with:
mirror-repos <PATH_TO_CONFIG>