Files
github-to-gitea-mirror/mirror.env.example
T
2026-08-08 08:48:07 +02:00

27 lines
906 B
Bash

# Copy to mirror.env and fill in. Contains secrets -- keep at chmod 600.
# mirror.env is git-ignored on purpose; never commit the real file.
# --- GitHub (source) ---
GITHUB_USER=your-github-username
# Fine-grained token: "All repositories" + Contents: Read-only + No expiration.
# Leave empty to mirror public repositories only.
GITHUB_TOKEN=
# --- Gitea (target) ---
# As seen from the machine running this script.
GITEA_URL=http://127.0.0.1:3000
# Create with:
# docker exec -u git <container> gitea admin user generate-access-token \
# --username <user> --token-name github-mirror-sync \
# --scopes write:repository,read:user
GITEA_TOKEN=
GITEA_OWNER=your-gitea-username
# --- Behaviour ---
# How often Gitea pulls from GitHub (Go duration: 24h, 8h, 30m, ...).
MIRROR_INTERVAL=24h
INCLUDE_FORKS=false
INCLUDE_ARCHIVED=true
# Set to true to preview without changing anything.
DRY_RUN=false