Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Migrating Existing Secrets

If you choose to migrate to cred instead of continuing with manual .env files you’ll need the original values from wherever you stored them (password manager, .env files, etc.).

Migration Steps

1. Initialize cred:

cred init

2. Import your secrets:

From a .env file:

cred import .env

Or add individually:

cred secret set DATABASE_URL "postgres://..."
cred secret set API_KEY "sk-..."

3. Set up the GitHub target:

cred target set github

4. Push to GitHub:

Preview first:

cred push github --dry-run

Then push:

cred push github

Your existing workflows continue working unchanged — they reference secrets by name, and cred pushes to the same location.

Why Migrate?

Before (manual)After (cred)
Secrets in .env files or notesSingle encrypted vault
Copy-paste into GitHub UIcred push github
No visibility into what’s deployedcred status shows everything
Hard to sync across reposPush to multiple targets