-
-
Notifications
You must be signed in to change notification settings - Fork 522
Description
One of the things I was really hoping for was creating a complete entry with arbitrary structured data and as few prompts as possible without having to run generate
/edit
or generate
/insert
and type out the full path to the secret or re-edit my command multiple times.
I was REALLY hoping to do something like this:
gopass generate work/cloud/signin.aws.amazon.com/myusername alias:myAccountID mysecretquestion funnyrobot=bender alongstring:"really\n is\n some\n long\n string" anothersecretquestion
Or update like this:
gopass insert work/cloud/signin.aws.amazon.com/myusername ssh_pub_key:"$(cat ~/.ssh/id_rsa.pub)"
Where any key:value
or key=value
simply gets set as a YAML key: value
, and the same for the multiline however YAML parses and saves that. The mysecretquestion
and anothersecretquestion since they don't have values will trigger the "Please enter value for <keyname>:" dialog similar to how it currently does today, prompting once for each key and saving the
key: value` into the entry along with the rest.
An aside
You might question the value of embedding ssh_pub_key
in the data, but this lets me check in the comment field of the key which private key/system I initially setup my account with, then later when my separate work/cloud/myAccountID/myusername/id_rsa.pub
entry doesn't match, I'll know I've switched machines or had to revoke a key. Otherwise this is pretty much irrelevant as I thought up the use case while making up the example. 😄