diff options
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}" |
