Clone all repos for an authenticated user to a local directory.
- Install Git
- Install Node.js
- Run
npm install
in this directory - Create a personal access token (PAT) with the
repo
scope.- The
repo
scope is needed to fetch private repositories.
- The
export GITHUB_TOKEN='<PAT>'
./gh-backup DESTINATION
export GITHUB_TOKEN='<PAT>'
./gh-backup "$HOME/Code/gh-backup"