A simple cli app to clone all repos managed by a github organisation or team.
Requires that you pass a github api key (personal access token) and github username to the script or set the GITHUB_TOKEN and GITHUB_USER environment variable. See the help output below.
The following script will install a binary from a tagged release
curl https://raw.githubusercontent.com/steinfletcher/github-org-clone/master/download.sh | sh
mv github-org-clone /usr/local/binOr install from master using go
go get github.com/steinfletcher/github-org-cloneExport env vars in ~/.bashrc or equivalent
export GITHUB_USER=<your github username>
export GITHUB_TOKEN=<a github personal access token with clone repo privileges>(Alternatively supply these as flags to the command --username and --token).
Clone team repos
github-org-clone --org MyOrg --team MyTeamClone organisation repos
github-org-clone -o MyOrgOverride the default location
github-org-clone -o MyOrg -d ~/projects/workOverride the github api url
github-org-clone -o MyOrg -a https://mycustomdomain.comFor enterprise installations include the full path to the github api
github-org-clone -o MyOrg -a https://mycustomdomain.com/api/v3View docs
github-org-clone -h