cloner
A tool to clone efficiently all the repos in an organization
Installation
MacOS (not yet tested)
python3 -m venv .venv
pip3 install virtualenv
source .venv/bin/activate
pip3 install -r requirements.txt
python3 cloner --help
Windows10
python3 -m venv .\.venv\
pip3 install virtualenv
.\.venv\Scripts\activate
pip3 install -r .\requirements.txt
python3 cloner --help
Usage
Cloning only public repos:
python3 cloner <organization>
Cloning all the repos your user can see (GitHub token needed):
python3 cloner <organization> --token=<your_github_token>
More info:
python3 cloner --help
To exit the virtual env:
deactivate
Running Tests (WIP)
With the virtual env active and in the root folder:
pip3 install -r requirements-dev.txt
pytest tests
Contributing
Issues and Pull Requests are welcome :)
License
Other & Troubleshooting
Multithreading doesn't work to clone repos, since the os.system
call is 1 for each PID. The splitting is done with multithreading, the cloning with multiprocessing. Same amount of threads and processes.
If we can't activate the virtual env in Windows10, review with this:
> Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
> Get-ExecutionPolicy -List