A tool to clone efficiently all the repos in an organization
Project description
cloner
A tool to clone efficiently all the repos in an organization
Install
When installing from PyPi, use wr-cloner, cloner was already taken :sad:
pip install wr-cloner
Usage
Note: If using cloner after cloning the project and not a PyPi package, add "python" at the start. There's an example of that in the examples section.
Usage: cloner [OPTIONS] GITHUB_ORGANIZATION
A tool to clone efficiently all the repos in an organization
Options:
--version Show the version and exit.
--token TEXT GitHub token to read private repos. This
parameter is needed when cloning from an
GitHub Enterprise server.
--ghe TEXT GitHub Enterprise URL. It needs the
GITHUB_ORGANIZATION parameter to clone repos
from there and the TOKEN option as well.
--threads INTEGER Number of threads and processes to use. For
maximum threads and processes on the system,
use '--max-threads' [default: 4]
--logging [ERROR|WARNING|INFO|DEBUG]
Logging level [default: INFO]
--path TEXT Sets a path where to clone the repositories
(eg: ./another/path/)
--git-options TEXT Add options to the clone command (eg: --git-
options "--depth 1"). By default, clones
quietly (--quiet).
--max-threads If declared, uses the maximum available
threads and processes in the system. As per
physical cores on the system cpu.
--help Show this message and exit.
Examples
# For github.com with 8 threads
cloner --threads 8 GITHUB_ORGANIZATION
# For github.com with the maximum threads on the system running
cloner --max-threads GITHUB_ORGANIZATION
# For GHE, default threads
cloner --ghe GHE_URL --token SUPER_SECURE_TOKEN GITHUB_ORGANIZATION
# Cloning with options
cloner --git-options "--depth 1" GITHUB_ORGANIZATION
# With the repo cloned, no options
python cloner GITHUB_ORGANIZATION
Contributing
Check the CONTRIBUTING.md file.
Security
Follow the instructions in the SECURITY.md file.
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.
Star History
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wr-cloner-1.9.0.tar.gz
(11.1 kB
view hashes)
Built Distribution
wr_cloner-1.9.0-py3-none-any.whl
(12.0 kB
view hashes)
Close
Hashes for wr_cloner-1.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6d161e436b0d4cf584d691674d36fd7e7a89fea3daa985cd9b5431ffe8cf103 |
|
MD5 | 0b95f5f31c8184b8fa8c200411a3b0d2 |
|
BLAKE2b-256 | eae6a1a21a7327b9e672ef54c5b6eeaa18171f92d72d89e46ad40c0d48b6483e |