A little script to backup github repos (only includes repos created by user) to my person gitea.
All params are passed by env variables:
GITHUB_TOKEN(required)
: github personal tokenGITEA_TOKEN(required)
: gitea personal tokenGITEA_DOMAMIN(required)
: gitea domain url, e.g. http://tea.cjting.meGITHUB_PROXY(optional)
: if passed, will use this proxy to clone github repos
Usage:
# clone this repo
$ git clone ..
# install dependencies
$ yarn
# run the script
$ GITHUB_TOKEN=xxx GITEA_TOKEN=xxx GITEA_DOMAIN=xxx node backup.js