Add non-interactive vault pass install modes

This commit is contained in:
2026-05-14 15:45:16 +08:00
parent ea1bb0979f
commit 1cd0bfb9f2
4 changed files with 119 additions and 24 deletions

View File

@@ -66,6 +66,24 @@ git push
腳本會要求互動輸入 zip 密碼。這個 zip 密碼不要寫進 repo、chat 或 log交給安裝者時用另外的安全渠道。
## 給 agent 的全自動安裝方式
如果目標是「AI agent 直接安裝,不要卡在互動輸入密碼」,請不要讓 agent 選互動 zip 解壓。改用環境變數指定方法:
```bash
# 一次性 URL 下載
INSTALL_VAULT_PASS_METHOD=url \
VAULT_PASS_URL="https://example.com/one-time/vault-pass.txt" \
./scripts/install-vault-pass.sh
# 或zip 密碼放在本機安全檔案
INSTALL_VAULT_PASS_METHOD=archive \
VAULT_PASS_ZIP_PASSWORD_FILE=/secure/path/zip-password.txt \
./scripts/install-vault-pass.sh
```
不要把 zip 密碼或 vault-pass 內容貼在聊天裡;應由目標機器的 secret manager、一次性 URL 或本機安全檔提供。
## 常用人工操作
### 查看 vault