Parse error when setting a variable
linoor opened this issue · 4 comments
linoor commented
I'm getting en error Error: no such option: -----BEGIN PRIVATE KEY-----
when trying to set a variable. I'm guessing it's because it's trying to parse a string starting with -----
as some option to the script.
To reproduce:
vault set sae_private_crt_key "-----asd"
ewjoachim commented
For complicated variables, try to set them via stdin (--stdin
)
ewjoachim commented
$ vault set --stdin sae_private_crt_key
-----BEGIN PRIVATE KEY-----
bla
-----END PRIVATE KEY-----
(ctrl+d)
ewjoachim commented
Also, 2 dashes to indicate the end of the CLI flags should help vault-cli: vault set sae_private_crt_key -- -----BEGIN PRIVATE KEY-----...
should work too.
linoor commented
cool, thanks! I'm closing the ticket then.