This commit is contained in:
Andre
2026-08-08 08:48:07 +02:00
commit d7f5097d1f
6 changed files with 767 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
# 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