2023-04-05 20:47:54 +02:00
# Backup GitHub repos to Gitea
2023-03-09 02:09:52 +01:00
2023-04-05 20:47:54 +02:00
Simple docker image that syncs your GitHub repos to a given Gitea server. It takes all the repos (public and private) and sets up a mirror. Private repos will stay a private mirror. Repos that are already set up will be skipped.
2023-03-09 02:24:53 +01:00
## Quick Start
2023-04-05 20:47:54 +02:00
Create a `docker-compose.yaml` and `.env` (see `.env.sample` ). Create and insert tokens, and you are ready to go.
2023-03-09 02:30:33 +01:00
2023-03-09 02:24:53 +01:00
```yaml
2023-03-09 02:30:33 +01:00
version: '3.8'
2023-03-09 02:24:53 +01:00
2023-03-09 02:30:33 +01:00
services:
sync:
2023-03-09 02:34:01 +01:00
image: cupcakearmy/gitea-sync:1
2023-03-09 02:30:33 +01:00
restart: unless-stopped
env_file: .env
2023-03-09 02:24:53 +01:00
```
## Configuration
```sh
2023-04-05 20:47:54 +02:00
# Github PAT (deprecated)
# or
# Fine Grained token (Metadata and Content read-only scopes required)
2023-03-09 02:24:53 +01:00
GITHUB_TOKEN=
# Host of the Gitea server
GITEA_HOST=
2023-04-05 20:47:54 +02:00
# Gitea token (scopes: repo)
2023-03-09 02:24:53 +01:00
GITEA_TOKEN=
# OPTIONAL
# Cron schedule
CRON="0 */2 * * * "
```
2023-03-09 02:09:52 +01:00
## Known limitations
- Issues, PR, etc. can be imported, but [not for a mirror ](https://github.com/go-gitea/gitea/issues/18369 )