Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamskok/git-sync
Backup all GitHub repositories to GitLab.
https://github.com/iamskok/git-sync
backup docker git github gitlab python
Last synced: about 2 months ago
JSON representation
Backup all GitHub repositories to GitLab.
- Host: GitHub
- URL: https://github.com/iamskok/git-sync
- Owner: iamskok
- Created: 2021-01-21T02:05:09.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-28T11:53:53.000Z (4 months ago)
- Last Synced: 2024-08-29T08:47:59.789Z (4 months ago)
- Topics: backup, docker, git, github, gitlab, python
- Language: Python
- Homepage:
- Size: 122 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git Sync (GitHub ➡️ GitLab)
Backup all GitHub repositories in GitLab.
## Preinstallation
- Create GitHub [access token](https://github.com/settings/tokens/new) 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
```sh
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
```sh
python3 manage.py --install
```## Default Usage
```sh
python3 index.py
```## `manage.py` scripts
```sh
python3 manage.py --
```| 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 |