-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
江河 edited this page Jul 21, 2026
·
2 revisions
dbgov stores reusable database contexts and uses opskit-core credential backends for secrets.
dbgov ctx set <name> --engine mysql|postgres --host <host> --port <port> \
--database <db> --username <user> [--env <env>] [--protected] --dry-run -o json
dbgov ctx set <name> --engine mysql|postgres --host <host> --port <port> \
--database <db> --username <user> [--env <env>] [--protected] \
--ticket <human-ticket> --allow-context-change --yes
dbgov ctx use <name> --dry-run -o json
dbgov ctx use <name> --ticket <human-ticket> --allow-context-change --yes
dbgov ctx list -o json
dbgov ctx current -o jsonUse --protected for production. Protected contexts raise every operation one risk tier.
For non-interactive runs, prefer the environment variable:
export DBGOV_PASSWORD='***'To persist a credential, use a non-plain backend:
dbgov ctx set prod --engine mysql --host db.example.com --port 3306 \
--database app --username appuser \
--credential-backend keychain --password '<secret>' \
--ticket <human-ticket> --allow-context-change --yesPlain YAML password storage is rejected for new ctx set --password flows. Legacy inline credentials remain readable for migration and export compatibility.
dbgov ctx export prod -o json
dbgov ctx import -f ctx.yaml --rename prod-copy --force --dry-run -o json
dbgov ctx import -f ctx.yaml --rename prod-copy --force --ticket <human-ticket> --allow-context-change --yes -o json
dbgov ctx migrate-credentials --to encrypted-file --context prod --dry-run -o json
dbgov ctx migrate-credentials --to encrypted-file --context prod --ticket <human-ticket> --allow-context-change --yes -o jsonContext export redacts credentials unless explicitly requested.