This Python script automates the process of cloning all repositories starred by a GitHub user. Simply provide your GitHub username and Personal Access Token (PAT), and it will fetch and clone the repositories into a local directory.
- Automatically fetches starred repositories.
- Clones each repository locally.
- Skips already cloned repositories to avoid duplication.
- Python 3.x
requestslibrary (pip install requests)GitPythonlibrary (pip install gitpython)- A GitHub Personal Access Token (PAT)
git clone https://github.com/manupawickramasinghe/clone-github-starred.git
cd clone-github-starredpip install -r requirements.txtEdit github_clone.py and set your GitHub username and PAT:
username = 'Enter Your Username'
token = 'Enter Your PAT'Execute the script to clone starred repositories:
python github_clone.py- Ensure your PAT has the necessary permissions to read repository data.
- Verify your network connection if cloning fails.
- If repositories already exist, the script will skip them.
Feel free to submit issues or pull requests to enhance the functionality.
This project is licensed under the MIT License.