闲社服务运行正常AI智能体自动化平台
g

git加密备份

技能标识:git-crypt-backup

Backup Clawdbot workspace and config to GitHub with git-crypt encryption. Use for daily automated backups or manual backup/restore operations.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
2
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

git加密备份

Git-Crypt 备份

将 Clawdbot 工作区(~/clawd)和配置(~/.clawdbot)自动备份到 GitHub,敏感文件通过 git-crypt 加密。

设置

1. 创建 GitHub 仓库(建议设为私有)

bash

在 GitHub 上创建两个私有仓库:


- <用户名>/clawdbot-workspace


- <用户名>/clawdbot-config

2. 初始化 git-crypt

bash

安装 git-crypt


brew install git-crypt # macOS

apt install git-crypt # Linux

工作区仓库

cd ~/clawd git init git-crypt init git remote add origin git@github.com:<用户名>/clawdbot-workspace.git

配置仓库

cd ~/.clawdbot git init git-crypt init git remote add origin git@github.com:<用户名>/clawdbot-config.git

3. 配置加密规则

工作区 .gitattributes:

SOUL.md filter=git-crypt diff=git-crypt
USER.md filter=git-crypt diff=git-crypt
HEARTBEAT.md filter=git-crypt diff=git-crypt
MEMORY.md filter=git-crypt diff=git-crypt
memory/ filter=git-crypt diff=git-crypt

配置 .gitattributes:

clawdbot.json filter=git-crypt diff=git-crypt
.env filter=git-crypt diff=git-crypt
credentials/ filter=git-crypt diff=git-crypt
telegram/ filter=git-crypt diff=git-crypt
identity/ filter=git-crypt diff=git-crypt
agents//sessions/ filter=git-crypt diff=git-crypt
nodes/ filter=git-crypt diff=git-crypt

配置 .gitignore:

*.bak
.bak.
.DS_Store
logs/
media/
browser/
subagents/
memory/
update-check.json
*.lock

4. 导出密钥(重要!)

bash
mkdir -p ~/clawdbot-keys
cd ~/clawd && git-crypt export-key ~/clawdbot-keys/workspace.key
cd ~/.clawdbot && git-crypt export-key ~/clawdbot-keys/config.key

⚠️ 安全存储这些密钥(1Password、iCloud 钥匙串、U盘等)

5. 首次提交并推送

bash
cd ~/clawd && git add -A && git commit -m 初始备份 && git push -u origin main
cd ~/.clawdbot && git add -A && git commit -m 初始备份 && git push -u origin main

每日备份

运行 scripts/backup.sh:

bash
~/clawd/skills/git-crypt-backup/scripts/backup.sh

或设置 cron 任务实现自动每日备份。

在新机器上恢复

bash

1. 克隆仓库


git clone git@github.com:<用户名>/clawdbot-workspace.git ~/clawd
git clone git@github.com:<用户名>/clawdbot-config.git ~/.clawdbot

2. 使用密钥解锁

cd ~/clawd && git-crypt unlock /path/to/workspace.key cd ~/.clawdbot && git-crypt unlock /path/to/config.key

加密内容说明

仓库加密内容明文内容
工作区SOUL/USER/HEARTBEAT/MEMORY.md, memory/AGENTS.md, IDENTITY.md, TOOLS.md, drafts/
配置
clawdbot.json, .env, credentials/, sessions/ | cron/jobs.json, settings/ |

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 git-crypt-backup-1776384849 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 git-crypt-backup-1776384849 技能

通过命令行安装

skillhub install git-crypt-backup-1776384849

下载

⬇ 下载 git-crypt-backup v1.0.0(免费)

文件大小: 2.17 KB | 发布时间: 2026-4-17 15:00

v1.0.0 最新 2026-4-17 15:00
Initial release: automated backup for Clawdbot workspace and config with git-crypt encryption
返回顶部