Skip to content

iamskok/git-sync

Repository files navigation

Git Sync (GitHub ➡️ GitLab)

Backup all GitHub repositories in GitLab.

Preinstallation

  • Create GitHub access token with admin:public_key and repo scope.
  • Copy and rename .env.sample in the root directory and update it's values.

Docker Installation

Assuming SSH keys are stored in ~/.ssh directory.

docker build --tag git-sync .

Docker usage

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-sync

Default Installation

python3 manage.py --install

Default Usage

python3 index.py

manage.py scripts

python3 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

About

Backup all GitHub repositories to GitLab.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published