|
|
|
|
|
by Jakob
612 days ago
|
|
As middle ground for small scripts I like implementations like the one from 1Password: The environment variables contain the path to the secret: export DB_PASSWORD="op://app-prod/db/password" Calling the script with `op run scriptname` replaces the secret path with the actual secret after authentication during runtime. This way you can commit the file but people still can use their own passwords locally without saving them in plaintext. |
|
Inspiration here: https://gist.github.com/bmhatfield/f613c10e360b4f27033761bbe...
Then you can use it like this:
export OPENAI_API_KEY=$(keychain-environment-variable OPENAI_API_KEY)