Clone all your GitHub repos including public and private with GitHub cli gh.
brew install gh
winget install --id GitHub.cli
To authenticate gh with GitHub
gh auth login
Complete the prompts to complete the authentication.
To login with scoped token
gh auth login --with-token $GH_TOKEN
Check auth status
$ gh auth status
github.com
✓ Logged in to github.com as kdpuvvadi (oauth_token)
✓ Git operations for github.com configured to use ssh protocol.
✓ Token: *******************
./clone_all.ps1
With Powershell core, this tool be can used on all the platforms.
pwsh .\clone_all.ps1