Created
April 1, 2026 05:44
-
-
Save epcim/479188c2a98468ed9c0187386a54e23a to your computer and use it in GitHub Desktop.
keyring, secrets management and CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # gopass | |
| EDITOR=vi gopass insert me/api/xyz_api_key | |
| XYZ_API_KEY="$(gopass -o me/api/xyz_api_key)" | |
| # python | |
| python -m keyring set XYZ_API_KEY <username> | |
| python -m keyring get XYZ_API_KEY <username> | |
| # MacOS | |
| get_secret() { | |
| security find-generic-password -a "$USER" -s "$1" -w | |
| } | |
| export XYZ_API_KEY=$(get_secret XYZ_API_KEY) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment