Last active
August 29, 2015 13:56
-
-
Save jcamenisch/8941463 to your computer and use it in GitHub Desktop.
With latest (master) version of dotenv, you can load in sensitive information straight from the Mac OS X keychain.
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
AWS_ACCESS_KEY_ID=$(keychain_account s3.amazonaws.com) | |
AWS_SECRET_ACCESS_KEY=$(keychain_password s3.amazonaws.com $AWS_ACCESS_KEY_ID) |
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
#!/bin/sh | |
security 2>&1 find-internet-password -s $1 | ruby -ne 'puts $1 if $_ =~ /^\s*"acct"<blob>="(.+)"$/' |
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
#!/bin/sh | |
security 2>&1 find-internet-password -s $1 -ga $2 | ruby -ne 'puts $1 if $_ =~ /^password: "(.+)"$/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment