Repository navigation
v1.0.3 - Python Rewrite Release
Summary
Complete rewrite from Node.js to Python, enabling single-file executable deployment without pip/npm on target machines.
Features
Auth & Config
- Config path: default
/etc/git-sync/config.yaml, CLI--configoverride - Storage:
./stateand./repos(relative paths, no permission issues) - Auth redesigned: URL prefix-based
- SSH:
git@host:pathwithssh_private_keypath - HTTPS:
https://host/pathwithusername+password(env vars via${VAR})
- SSH:
- CLI
--log-leveloverride (DEBUG/INFO/WARN/ERROR) - Structured logging throughout sync pipeline
Technical Stack
| Component | Technology |
|---|---|
| CLI | Click |
| TUI | Textual |
| Config | Pydantic + YAML |
| State | sqlite3 (stdlib) |
| Git ops | subprocess |
| Author rewrite | git-filter-repo (bundled) |
System Requirements
- Ubuntu x86_64
- git CLI (required)
Installation
# Download and extract
wget https://github.com/JasonW404/Git-Sync/releases/download/v1.0.3/git-sync-1.0.3-linux-x86_64.tar.gz
tar -xzf git-sync-1.0.3-linux-x86_64.tar.gz
# Create config directory
sudo mkdir -p /etc/git-sync
# Copy example config
sudo cp git-sync.yaml.example /etc/git-sync/config.yaml
# Edit config
sudo nano /etc/git-sync/config.yaml
# Run
./git-sync-1.0.3-linux-x86_64 syncConfig Example
version: 1
settings:
state_dir: ./state
repo_dir: ./repos
log_level: INFO
author_mappings:
- match_email: "alice@personal.com"
internal_name: "Alice Wang"
internal_email: "alice.wang@internal.corp"
sync_tasks:
- name: production-services
repos:
- id: api-service
source:
url: git@github.com:org/api-service.git
ssh_private_key: ~/.ssh/id_rsa
destination:
url: https://git.internal.corp/mirrors/api-service.git
username: sync-bot
password: ${SYNC_PASSWORD}
branches: ["main"]
tags: trueCLI Usage
# Show help
git-sync --help
# Sync all repos
git-sync sync
# Sync specific repo
git-sync sync -r api-service
# Validate config
git-sync config validate
# Show config
git-sync config show
# Debug logging
git-sync -l DEBUG sync
# Start daemon
git-sync daemonBreaking Changes
- Old config format (
github_url,internal_url,auth.type) no longer supported - Use new
source/destinationformat with URL prefix-based auth