Load a config that has no age recipient (closes #221)
check / check (push) Successful in 14m30s
check / check (push) Successful in 14m30s
The README's steps for restoring on another machine failed at the first command: `config init` wrote a placeholder recipient, and `config.Load` rejects any recipient that does not parse. `config init` now writes an empty `age_recipients` list, `config.Load` accepts an empty list, and `snapshot create` refuses to start without a recipient. A malformed recipient is still rejected at load. The recovery-host test now builds its config with `config init` and `config set` and reads it through `config.Load`, so it imports `internal/cli`. On a fresh file, `config set age_recipients.0` writes the list in flow style (`[age1...]`). Model: opus-5-5
This commit is contained in:
@@ -45,16 +45,19 @@ const defaultConfigTemplate = `# vaultik configuration
|
||||
|
||||
# ─── REQUIRED ────────────────────────────────────────────────────────────────
|
||||
|
||||
# Age recipient public keys for encryption.
|
||||
# Age recipient public keys for encryption. snapshot create needs at least
|
||||
# one; listing, verifying and restoring do not, so a machine that only
|
||||
# restores can leave this empty.
|
||||
# Backups are encrypted to ALL listed recipients; any one of the corresponding
|
||||
# private keys can decrypt. Adding a recipient later does not re-encrypt data
|
||||
# already stored: deduplicated chunks and existing blobs stay encrypted to the
|
||||
# earlier recipients, so a newly added key cannot restore them on its own (see
|
||||
# docs/REPOSTRUCTURE.md, Accepted Risks). Generate a keypair with:
|
||||
# docs/REPOSTRUCTURE.md, Accepted Risks). Generate a keypair and add its
|
||||
# public key with:
|
||||
# age-keygen -o vaultik_backup_private_key.txt
|
||||
# grep 'public key' vaultik_backup_private_key.txt
|
||||
age_recipients:
|
||||
- age1REPLACE_WITH_YOUR_PUBLIC_KEY
|
||||
# vaultik config set age_recipients.0 age1...
|
||||
age_recipients: []
|
||||
|
||||
# Named snapshots. Each snapshot backs up one or more paths and can have its
|
||||
# own exclude patterns in addition to the global excludes below.
|
||||
|
||||
Reference in New Issue
Block a user