An helper tool for cloning repositories
Report Bug
·
Request Feature
GCRH (Github Clone Repo Helper) is an helper tool for cloning user repositories with ease ! It's build for personnal repos, so you'll need a personnal access token in order to make it work.
Please note that this script needs some dependencies to work.
You'll need to install git
, jq
, gh
and mflibs
- git
- jq
- gh
- mschf-dev/mflibs
jq and git installation
You can install those two packages with
apt install -y jq git
gh (cli/cli) installation
gh
is GitHub on the command line. It brings pull requests, issues, and other GitHub concepts to the terminal next to where you are already working withgit
and your code.
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh
mschf-dev/mflibs installation
A collection of various functions and scripts for BASH 4.0 or greater:
reduce duplicated code
add your own libraries with ease
To install it, you need to clone this repo to /usr/lib/mflibs
(important !)
git clone https://github.com/mschf-dev/mflibs /usr/lib/mflibs
Now that you have installed all the required packages, you can clone this repo wherever you want.
ln -s /path/to/gcrh/src/gcrh /usr/lib/gcrh
gcrh clone -u [username] -t [token] -v [public/private (default:public)] -a [true/false (default:false)]
Example:
gcrh clone -u tomcdj71 -t ghp_MYSUPERTOKEN -v public -a false
will retrieve all my public and non-archived repos and then ask what repos you want clone to /opt/gcrh/tomcdj71
gcrh update -u [username] -t [token]
Example:
gcrh update -u tomcdj -t ghp_MYSUPERTOKEN
will find all cloned repos and then updates them to the latest commit. All other flags are not taken into consideration.
Contributions are what make the world go around. We would love to be able to accept any new contributions, but I have not written the contribution guidelines yet.
Distributed under the BSD-3-Clause License. See license for more information.
@tomcdj71 - Idea & Initial work
See the list of contributors who participated in this project.