Purpose
Ensure every bare repo in a directory mirrors reliably without manual per-repo setup.
Current state
Last touched: 2025-09-07. Functionality and completeness: Scripted mirror automation is documented and ready for ops use.
Next step
Add baseline automated tests to cover critical flows; Add CI pipeline for build/test/lint; Document deployment/runtime environment (or add Dockerfile); Document interfaces (CLI flags, API endpoints, file formats); Add structured logging and basic health checks.
Interfaces
Inputs- Bare Git repos, mirror URL pattern
- Directory of bare Git repos
- Remote name (optional)
Outputs- Git remotes, post-receive hooks, mirror pushes
- Updated git remotes
- Installed post-receive hooks
- Mirror pushes to target remote
Reality to Action trace
Reality IngestionContributes in this stage.
Canonical StorageNot in scope.
Automation EnginesNot in scope.
Human InterfacesContributes in this stage.
Operational AdoptionContributes in this stage.
Core workflow
TBD. Document the 5-10 steps that define the core workflow.
Operational notes
Constraints and scars
- Assumes bare repositories; non-bare repos are skipped and require different handling.
Reliability posture
Failure modes and safe behavior: Auth or push failures are reported but do not stop other repos. Idempotency / retries / batching behavior: Idempotent; safe to re-run without duplicating hooks/remotes.
Observability
- Logs: stdout summary with per-repo actions
- Metrics/health checks: None documented
- Logs: stdout summary of actions and failures.
Security and privacy
Requires mirror credentials (SSH keys or tokens); rotate keys and restrict server access.
Dependencies
Upstream- Git servers (source and mirror)
Ownership
OwnersJosh Barton
UsersJosh Barton (owner)
Architecture & Major Components
High-level diagram (text):
- Script -> repo discovery -> remote management -> hook installation -> mirror push
Script
→repo discovery
→remote management
→hook installation
→mirror push
Entry points: mirrorize-bare-repos.sh
Top-level folders: none (files only)
Key abstractions: bare repo detection, mirror URL patterning, post-receive hook installer
Setup / Build / Run
Setup / Build / Run
- Build system(s): None (shell script).
- Requires Git, a directory of bare repos, and working SSH access to the mirror target.