List repos up on GitHub Search.
github-repos -z -search "org:yourorg archived:false"
returns github ssh clone url on yourorg, split by NULL.
This returns all non-archived repos.
github-repos -search "org:packsaddle" -z | xargs -0 -P 4 -I {} git clone {} --depth 1
required: GITHUB_TOKEN=__YOUR_PERSONAL_TOKEN__
There are several ways for cloning GitHub repositories in an organization.
- How to clone all repositories in a Github Organization
- Cloning All Repositories in a GitHub Organization - Scott's Weblog - The weblog of an IT pro focusing on cloud computing, Kubernetes, Linux, containers, and networking
- Clone all repos from a GitHub organization
But I don't want to see my personal token for GitHub. And I want to handle pagination because my organization has over 400 repos 😅
I tried caarlos0/clone-org, but sometimes I got errors.
ghg get sanemat/go-githubrepos
go install github.com/sanemat/go-githubrepos/cmd/github-repos@latest
Copyright 2019 Matt (Sanemat) (Murahashi Kenichi) Apache License Version 2.0