eve-auth-and-secrets
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEve Auth and Secrets
Eve 身份验证与密钥管理
Use this workflow to log in to Eve and manage secrets for your app.
使用此工作流登录Eve并管理你的应用密钥。
When to Use
适用场景
- Setting up a new project profile
- Authentication failures
- Adding or rotating secrets
- Secret interpolation errors during deploys
- 设置新项目配置文件
- 身份验证失败时
- 添加或轮换密钥
- 部署期间出现密钥插值错误时
Authentication
身份验证
bash
eve auth login
eve auth login --ttl 30 # custom token TTL (1-90 days)
eve auth statusOptional (sync local OAuth tokens for agent harnesses):
bash
eve auth syncbash
eve auth login
eve auth login --ttl 30 # 自定义令牌TTL(1-90天)
eve auth status可选操作(为agent harness同步本地OAuth令牌):
bash
eve auth syncToken Minting (Admin)
令牌生成(管理员权限)
Mint tokens for bot/service users without SSH login:
bash
undefined为机器人/服务用户生成令牌,无需SSH登录:
bash
undefinedMint token for a bot user (creates user + membership if needed)
为机器人用户生成令牌(如需则创建用户及成员身份)
eve auth mint --email app-bot@example.com --org org_xxx
eve auth mint --email app-bot@example.com --org org_xxx
With custom TTL (1-90 days, default: server configured)
设置自定义TTL(1-90天,默认:服务器配置值)
eve auth mint --email app-bot@example.com --org org_xxx --ttl 90
eve auth mint --email app-bot@example.com --org org_xxx --ttl 90
Scope to project with admin role
限定项目范围并赋予管理员角色
eve auth mint --email app-bot@example.com --project proj_xxx --role admin
TTL is capped at the server's `EVE_AUTH_TOKEN_TTL_DAYS` env var (max 90 days).eve auth mint --email app-bot@example.com --project proj_xxx --role admin
TTL上限为服务器的`EVE_AUTH_TOKEN_TTL_DAYS`环境变量值(最长90天)。Project Secrets
项目密钥
bash
undefinedbash
undefinedSet a secret
设置密钥
eve secrets set API_KEY "your-api-key" --project proj_xxx
eve secrets set API_KEY "your-api-key" --project proj_xxx
List keys (no values)
列出密钥名称(不显示值)
eve secrets list --project proj_xxx
eve secrets list --project proj_xxx
Delete a secret
删除密钥
eve secrets delete API_KEY --project proj_xxx
undefinedeve secrets delete API_KEY --project proj_xxx
undefinedSecret Interpolation
密钥插值
Reference secrets in using :
.eve/manifest.yaml${secret.KEY}yaml
services:
api:
environment:
API_KEY: ${secret.API_KEY}在中使用引用密钥:
.eve/manifest.yaml${secret.KEY}yaml
services:
api:
environment:
API_KEY: ${secret.API_KEY}Local Secrets File
本地密钥文件
For local development, create (gitignored):
.eve/secrets.yamlyaml
API_KEY: local-dev-key
DB_PASSWORD: local-passwordThis file is used for local interpolation; production secrets come from the Eve API.
本地开发时,创建(已加入git忽略):
.eve/secrets.yamlyaml
API_KEY: local-dev-key
DB_PASSWORD: local-password此文件用于本地插值;生产环境密钥来自Eve API。
Common Issues
常见问题
- Not authenticated: run .
eve auth login - Secret missing: confirm with and set the key.
eve secrets list - Interpolation error: verify spelling and that the secret exists.
${secret.KEY}
- 未通过身份验证:执行。
eve auth login - 密钥缺失:使用确认并设置密钥。
eve secrets list - 插值错误:检查的拼写及密钥是否存在。
${secret.KEY}