跳过内容

🔐 密钥

🔐 为安全分发打包而管理加密密钥,支持使用 RSA 和 AES combination 的端到端加密在 Capgo Cloud 中。

终端窗口
npx @capgo/cli@latest key save

💾 将公钥保存在 Capacitor 配置中,适用于 CI 环境。 建议不要将密钥提交到版本控制中以保持安全。

示例:

终端窗口
npx @capgo/cli@latest key save --key ./path/to/key.pub

选项:

参数:类型描述
-f,string强制生成一个新的
—keystring保存在 Capacitor 配置中的键路径
—key-datastring保存在 Capacitor 配置中的键数据
终端窗口
npx @capgo/cli@latest key create

🔨 Create RSA key pair for end-to-end encryption. Creates .capgo_key_v2 (private) and .capgo_key_v2.pub (public) in project root. Public key is saved to capacitor.config for mobile app decryption. NEVER commit the private key - store it securely!

生成 .__CAPGO_KEEP_0___key_v2 (私钥) 和 .__CAPGO_KEEP_1___key_v2.pub (公钥) 在项目根目录。

公钥保存到 __CAPGO_KEEP_2__.config 中用于移动应用程序解密。
npx @capgo/cli@latest key create

示例:

终端窗口复制到剪贴板选项:
参数string类型

🗑️ 描述

删除旧的
终端窗口
npx @capgo/cli@latest key delete_old

🧹 从 Capacitor 配置中删除旧的加密密钥,以确保只使用当前密钥。

示例:

终端窗口
npx @capgo/cli@latest key delete_old