This is a simple Bash script to download all public repositories from any GitHub user. It uses the GitHub API and optionally supports authentication via personal access token (PAT) to avoid rate limits.
- 🔎 Prompts for any GitHub username
- 🔐 Optional GitHub token support to avoid API rate limits
- 📂 Downloads all public repositories using
git
- 🔁 Handles paginated results (supports 100+ repos)
- 🧩 Lightweight, clean, and easy to use
bash
git
curl
grep
with PCRE support (grep -P
)
-
Clone the repository:
git clone https://github.com/nemocyberworld/Github-Repo-Downloader.git
-
Navigate into the project folder:
cd Github-Repo-Downloader
-
Make the script executable:
chmod +x download_github_repos.sh
-
Run the script:
./download_github_repos.sh
Just run the script and follow the prompts:
Enter GitHub username: johndoe
Enter GitHub token (optional, press Enter to skip):
All repositories will be downloaded into a folder named:
./johndoe-repos/
To avoid GitHub’s rate limiting (60 unauthenticated API requests/hour), you can use a personal access token:
- Go to: https://github.com/settings/tokens
- Click "Generate new token (classic)"
- Select the
public_repo
scope - Copy and paste the token into the script when prompted
Enter GitHub username: johndoe
Enter GitHub token (optional, press Enter to skip):
[*] Fetching repositories for user: johndoe
[+] Cloning https://github.com/johndoe/project-one.git
[+] Cloning https://github.com/johndoe/project-two.git
[✔] All public repositories for 'johndoe' downloaded.
This tool was created and maintained by Hacktolive Academy. We are committed to building open-source security tools and delivering real-world ethical hacking education.
👉 Visit us: https://hacktolive.com 📢 Follow us: https://www.facebook.com/h4k2liv3
This script is open-source and licensed under the MIT License.
If you find this tool helpful, consider sharing it or supporting us through:
- Contributions
- Feedback
- Community engagement
Stay curious. Stay ethical. Hack to learn. ✊