/BackupGitHubRepos

Backup GitHub hosted repositories

Primary LanguageTypeScriptMIT LicenseMIT

BackupGitHubRepos

Backup GitHub hosted repositories to a local directory.

Instructions

  1. Create GitHub access token with full repo level to access (only clone) private repositories

  2. Edit directory and account to backup of config.exmple.json and save it as config.json

    {
        "githubapi": {
            "oauthtoken": "TODO_FULL_REPO_LEVEL_ACCESS_TOKEN",
            "owner": "AnonymerNiklasistanonym"
        },
        "backupdir": "backup"
    }
  3. Run script

    npm install
    # -------- Normal ----------
    npm run build
    npm prune --production
    node .
    # -------- Dev    ----------
    npm run dev