https://github.com/steinfletcher/github-org-clone
:octocat: Clone repositories managed by a github organisation or team
https://github.com/steinfletcher/github-org-clone
clone github organisations teams
Last synced: 9 months ago
JSON representation
:octocat: Clone repositories managed by a github organisation or team
- Host: GitHub
- URL: https://github.com/steinfletcher/github-org-clone
- Owner: steinfletcher
- License: mit
- Created: 2017-12-17T20:37:40.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-15T20:34:37.000Z (almost 4 years ago)
- Last Synced: 2025-03-23T20:04:39.031Z (10 months ago)
- Topics: clone, github, organisations, teams
- Language: Go
- Homepage:
- Size: 35.2 KB
- Stars: 35
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-org-clone
[](https://travis-ci.org/steinfletcher/github-org-clone)
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.
## Install
The following script will install a binary from a tagged release
```bash
curl https://raw.githubusercontent.com/steinfletcher/github-org-clone/master/download.sh | sh
mv github-org-clone /usr/local/bin
```
Or install from master using go
```bash
go get github.com/steinfletcher/github-org-clone
```
## Use
Export env vars in `~/.bashrc` or equivalent
```bash
export GITHUB_USER=
export GITHUB_TOKEN=
```
(Alternatively supply these as flags to the command `--username` and `--token`).
Clone team repos
```bash
github-org-clone --org MyOrg --team MyTeam
```
Clone organisation repos
```bash
github-org-clone -o MyOrg
```
Override the default location
```bash
github-org-clone -o MyOrg -d ~/projects/work
```
Override the github api url
```bash
github-org-clone -o MyOrg -a https://mycustomdomain.com
```
For enterprise installations include the full path to the github api
```bash
github-org-clone -o MyOrg -a https://mycustomdomain.com/api/v3
```
View docs
```bash
github-org-clone -h
```