# 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 gitea admin user generate-access-token \ # --username --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 # Gitea's native mirror only pulls git data. The script separately keeps # GitHub release metadata and uploaded assets in sync on every cron run. SYNC_RELEASES=true SYNC_RELEASE_ASSETS=true # Set to true to preview without changing anything. DRY_RUN=false