Following on from my earlier post: -
Wow, why have I not been using 1Password for my SSH keys before today ?
I've got a little further, with various API keys now stored in my 1Password vault
This is far simpler, in that the vault entry, of type API Credential, only needs to have a name/title e.g. IBM Cloud API Key and a credential, the actual API key itself.
With that in place, I've then setup an alias to retrieve/display the API key: -
apikey='export APIKEY=$(op item get "IBM Cloud" --field credential) && echo $APIKEY'
in ~/.zprofile, meaning that I just need to run the "command" apikey to ... see my API key.
I will, of course, be leveraging the same API keys in various other scripts/aliases, including things that login to IBM Cloud etc.
Post a Comment