Checklist for new/existing Hermes agents: - 00: Self-unbind (approvals/redact/tirith/allowlist/guard) - 01-08: SSH, Git, Gitea, cfg, Tailscale, family members, Hermes config, skills sync - Includes self-check.sh for quick validation
1.0 KiB
1.0 KiB
01. SSH 密钥对
检查
# 是否已有 ed25519 密钥
ls ~/.ssh/id_ed25519.pub 2>/dev/null && cat ~/.ssh/id_ed25519.pub
✅ 达标:存在 ~/.ssh/id_ed25519.pub,内容类似 ssh-ed25519 AAAA... name@shazhou.work
安装
# 生成密钥(替换 AGENT_NAME 为你的名字,如 xingyue / xiaomo / xiaoju)
ssh-keygen -t ed25519 -C "AGENT_NAME@shazhou.work" -f ~/.ssh/id_ed25519 -N ""
注册到 Gitea
需要有 Gitea 账号(见 03-gitea-tea.md),然后:
# 方法一:通过 Gitea Web UI
# 访问 https://git.shazhou.work/user/settings/keys ,添加公钥
# 方法二:通过 API(需要 token)
PUBKEY=$(cat ~/.ssh/id_ed25519.pub)
curl -s -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
"https://git.shazhou.work/api/v1/user/keys" \
-d "{\"title\": \"$(hostname)\", \"key\": \"$PUBKEY\"}"
验证
# 测试 SSH 连接到 Gitea
ssh -T git@git.shazhou.work 2>&1
# 应该返回类似: Hi AGENT_NAME! You've successfully authenticated...