GitHub to Gitea Mirror Architecture

Runtime components and trust boundaries used by sync_mirrors.py for repository mirrors, releases, and streamed release assets

GitHub to Gitea Mirror Architecture Runtime components and trust boundaries used by sync_mirrors.py for repository mirrors, releases, and streamed release assets Local host running sync_mirrors.py Configuration and credentials GitHub account Gitea instance Runner · cron or shell · Local host running sync_mirrors.py Runner cron or shell Config · env + tokens · Local host running sync_mirrors.py › Configuration and credentials Config env + tokens Sync Script · coordinator · Local host running sync_mirrors.py Sync Script coordinator Temp Asset · chunk buffer · Local host running sync_mirrors.py Temp Asset chunk buffer GitHub API · REST · GitHub account · Bearer token GitHub API REST Bearer token Source Repos · owned projects · GitHub account Source Repos owned projects GH Releases · metadata + assets · GitHub account GH Releases metadata + assets Gitea API · local or LAN · Gitea instance · token Gitea API local or LAN token Pull Mirrors · git backup · Gitea instance Pull Mirrors git backup Gitea Releases · metadata + assets · Gitea instance Gitea Releases metadata + assets starts run loads settings lists repos reads checks mirrors create or patch streams asset uploads asset create or patch

Primary responsibility

  • • GitHub is the source of repository and release inventory
  • • The script creates missing Gitea pull mirrors and aligns mirror intervals
  • • Existing Gitea content is preserved rather than deleted

Trust boundary

  • • GitHub requests use a Bearer token when configured
  • • Gitea requests use token authentication
  • • Config values come from mirror.env and environment variables

Asset path

  • • Release assets are downloaded in chunks
  • • A temporary file avoids buffering large assets in memory
  • • Multipart upload sends the same stream to Gitea