Backup all GitHub repositories in GitLab.
- Create GitHub access token with
admin:public_keyandreposcope. - Copy and rename
.env.samplein the root directory and update it's values.
Assuming SSH keys are stored in ~/.ssh directory.
docker build --tag git-sync .
docker run -it \
--env-file=".env" \
-e SSH_PRIVATE_KEY="$(cat ~/.ssh/id_rsa)" \
-e SSH_PUBLIC_KEY="$(cat ~/.ssh/id_rsa.pub)" \
-v $PWD/data:/app/data \
git-syncpython3 manage.py --installpython3 index.pypython3 manage.py --<flag>| Flag | Description |
|---|---|
--install, -i |
Install pip3, yarn, and docker dependecies |
--lint, -l |
Lint python files |
--format, -f |
Format python files |
--commitlint, -c |
Lint commit message |
--dockerlint, -d |
Lint Dockerfile |
--prettier, -p |
Format json and md file |
--test, -t |
Run unit tests |