Atlas project production

git-tools

Ensure every bare repo in a directory mirrors reliably without manual per-repo setup. Scans a directory for bare repos and normalizes repo names. Ensures each repo has the mirror remote configured (optionally updating existing URLs). Installs a post-receive hook that pushes mirrors on every update. Cleans remote-tracking refs to avoid hidden-ref push failures, then runs an initial mirror push.

Type
Field Tool
Lifecycle
Active
Last touched
2025-09-07
Visibility
Public

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 Ingestion

Contributes in this stage.

Canonical Storage

Not in scope.

Automation Engines

Not in scope.

Human Interfaces

Contributes in this stage.

Operational Adoption

Contributes in this stage.

Core workflow

TBD. Document the 5-10 steps that define the core workflow.

Artifacts

  • N/A (Git operations)

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

Owners

Josh Barton

Users

Josh Barton (owner)

git-tools

Architecture & Major Components

  • High-level diagram (text):

    • 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.