Download All GitHub Repositories

Use GitHub CLI to clone all your repositories with a single command

GitHub CLI Method
The fastest and most reliable way to download all your repositories
1

Install GitHub CLI

Choose your operating system:

Windows
winget install GitHub.cli
macOS
brew install gh
Linux
sudo apt install gh
2

Authenticate with GitHub

Login to access your private repositories:

gh auth login
3

Download All Your Repositories

Use the following command depending on your operating system:

Windows (PowerShell)
gh repo list <OWNER_OR_USERNAME> --limit 1000 --json sshUrl | ConvertFrom-Json | ForEach-Object { git clone $_.sshUrl }
Linux & macOS
gh repo list <OWNER_OR_USERNAME> --limit 1000 --json sshUrl --jq '.[].sshUrl' | xargs -n1 git clone