Skip to content

Instantly share code, notes, and snippets.

@joshbirk
Created October 3, 2011 17:14
Show Gist options
  • Save joshbirk/1259633 to your computer and use it in GitHub Desktop.
Save joshbirk/1259633 to your computer and use it in GitHub Desktop.
Shell script to get password out of Keychain (OSX), via http://blog.macromates.com/2006/keychain-access-from-shell/
security 2>&1 >/dev/null find-generic-password -ga $1 \
|ruby -e 'print $1 if STDIN.gets =~ /^password: "(.*)"$/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment