diff options
| author | Igor Soarez <igor@soarez.org> | 2026-11-21 13:24:26 +0000 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-11-21 13:24:26 +0000 |
| commit | 990a23be281ee13e33c165f446d2ac3c0c88299c (patch) | |
| tree | fc05055a29b8bedb6a3121cb5bf808f9c17c9a38 /secrets/put-local.sh | |
| parent | c159f7526224d6dca42a456162e1b116083751df (diff) | |
szecret create-local <bucket>/<store>: a new store's key goes in a bucket this machine reads; plain <store> for an existing store or no bucketsHEADmaster
Diffstat (limited to 'secrets/put-local.sh')
| -rwxr-xr-x | secrets/put-local.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/secrets/put-local.sh b/secrets/put-local.sh index 5510df6..42b9564 100755 --- a/secrets/put-local.sh +++ b/secrets/put-local.sh @@ -55,7 +55,7 @@ fi # Read store name and pubkey from metadata if ! read_local_metadata "${metadata_file}"; then >&2 echo "ERROR: No .szecret metadata in ${target_dir}" - >&2 echo "Run 'szecret create-local <store-name> ${target_dir}' first" + >&2 echo "Run 'szecret create-local [<bucket>/]<store-name> ${target_dir}' first" exit 1 fi @@ -75,7 +75,7 @@ local_private_key="$(get_local_private_key "${local_store_name}")" # Create a temporary file for the public key (needed because age_encrypt uses pipes) temp_public_key="$(mktemp)" trap 'rm -f "${temp_public_key}"' EXIT -age-keygen -y <<<"${local_private_key}" > "${temp_public_key}" +printf '%s\n' "${local_private_key}" | age-keygen -y > "${temp_public_key}" # Encrypt data from stdin to the specified file path using the local store's public key age_encrypt "${temp_public_key}" "${file_path}" |
