返回顶部
g

git-sync-daemon

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
252
下载量
0
收藏
概述
安装方式
版本历史

git-sync-daemon

# Git Sync Daemon ## Purpose Provide a reusable, daemon-based git auto-sync workflow: - one repo list file - one daemon process - per-repo lock and independent failure isolation - service management on macOS and Linux ## Files - Engine: `scripts/git_sync_daemon.sh` - Control CLI: `scripts/git_sync_ctl.sh` ## Default Runtime Paths - State dir: `~/.config/git-sync-daemon` - Repo list: `~/.config/git-sync-daemon/repos.conf` - Log file: `~/.config/git-sync-daemon/git-sync-daemon.log` ## Repo Entry Format One line per repo: ```text /absolute/path/to/repo|remote=origin|branch=main|enabled=1 ``` Supported keys: - `remote` (default `origin`) - `branch` (default current branch) - `enabled` (`1/0`, `true/false`, default enabled) ## Quick Start (macOS) ```bash bash scripts/git_sync_ctl.sh init bash scripts/git_sync_ctl.sh add-repo /Users/samwei12/Develop/config bash scripts/git_sync_ctl.sh run-once bash scripts/git_sync_ctl.sh install-launchd bash scripts/git_sync_ctl.sh status ``` ## Quick Start (Linux) ```bash bash scripts/git_sync_ctl.sh init bash scripts/git_sync_ctl.sh add-repo /path/to/repo bash scripts/git_sync_ctl.sh run-once sudo bash scripts/git_sync_ctl.sh install-systemd bash scripts/git_sync_ctl.sh status ``` ## Operations - Add repo: `bash scripts/git_sync_ctl.sh add-repo <path> [branch] [remote]` - Remove repo: `bash scripts/git_sync_ctl.sh remove-repo <path>` - List repos: `bash scripts/git_sync_ctl.sh list-repos` - One cycle now: `bash scripts/git_sync_ctl.sh run-once` - Status/log tail: `bash scripts/git_sync_ctl.sh status` Service lifecycle: - macOS install: `bash scripts/git_sync_ctl.sh install-launchd` - macOS uninstall: `bash scripts/git_sync_ctl.sh uninstall-launchd` - Linux install: `sudo bash scripts/git_sync_ctl.sh install-systemd` - Linux uninstall: `sudo bash scripts/git_sync_ctl.sh uninstall-systemd` ## Production hardening checklist Before enabling daemon mode in production: 1. SSH/auth baseline - Ensure service user can run non-interactive git over SSH to each remote. - Preload host keys (`ssh-keyscan` / `StrictHostKeyChecking=accept-new`) to avoid first-run failures. - Prefer explicit key routing in `~/.ssh/config` (host/user/port/IdentityFile/IdentitiesOnly). 2. Service identity consistency - Install service with the same user that owns repo credentials and git config. - Verify `git config --global user.name/user.email` for that service user. 3. Repo registration policy - Register only clean, intended repos. - Keep one canonical branch per repo entry; avoid detached HEAD targets. - Use `enabled=0` for temporary pauses instead of deleting lines. 4. Observability - Keep logs in dedicated file and rotate externally if needed. - Validate `run-once` before enabling persistent service. ## Safety Notes - The daemon does not force-push. - Rebase conflicts are logged and isolated to the affected repo. - If `git-lfs` is required by hooks but missing, that repo is skipped with explicit error log. - On macOS launchd, PATH is expanded in both service env and daemon script to include Homebrew binaries. - Recommended migration practice: first successful run should use baseline repos only; then gradually add more repos.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 git-sync-daemon-1776204996 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 git-sync-daemon-1776204996 技能

通过命令行安装

skillhub install git-sync-daemon-1776204996

下载 Zip 包

⬇ 下载 git-sync-daemon v1.0.0

文件大小: 6.99 KB | 发布时间: 2026-4-15 10:56

v1.0.0 最新 2026-4-15 10:56
Initial release: multi-repo daemon sync with ctl workflow, systemd/launchd lifecycle, and production hardening guidance

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部