https://github.com/chriscummins/gh-archiver
💾 Clone and update a GitHub user's repos
https://github.com/chriscummins/gh-archiver
backup-script github
Last synced: 2 months ago
JSON representation
💾 Clone and update a GitHub user's repos
- Host: GitHub
- URL: https://github.com/chriscummins/gh-archiver
- Owner: ChrisCummins
- License: mit
- Created: 2017-05-27T18:22:05.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-05-06T23:19:59.000Z (about 6 years ago)
- Last Synced: 2025-01-28T10:45:16.165Z (over 1 year ago)
- Topics: backup-script, github
- Language: Python
- Homepage:
- Size: 1.26 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
gh-archiver
Mirror a GitHub user's repos locally.
This program fetches a GitHub user's repositories and mirrors them to a local
directory. New repositories are cloned, existing repositories are fetched from
remote.
## Setup
Create a Github [personal access token](https://github.com/settings/tokens/new).
If you intend to mirror your own private repositories, select "repo" from the
list of available scopes. To mirror only your public repositories or those
another user, no scopes are required.
Create a ~/.github/access_tokens/gh_archiver.txt file containing your
the personal access token you just created:
```sh
$ mkdir -p ~/.github/access_tokens
$ cat < ~/.github/access_tokens/gh_archiver.txt
YourAccessToken
EOF
$ chmod 0600 ~/.github/access_tokens/gh_archiver.txt
```
Then build and install the `gh_archiver` program using:
```sh
$ basel run -c opt //datasets/github/gh_archiver:install
```
Requires Python >= 3.6.
## Usage
Mirror a Github user's repositories to a directory using:
```sh
$ gh_archiver --user --outdir
```
## License
Made with ❤️ by [Chris Cummins](http://chriscummins.cc).
Released under [MIT License](https://tldrlegal.com/license/mit-license).