timkay / aws

Easy command line access to Amazon EC2, S3, SQS, ELB, and SDB
http://timkay.com/aws/
426 stars 125 forks source link

#39: add authinfo/netrc parsing and .gpg support #40

Closed tzz closed 11 years ago

tzz commented 11 years ago

The discussion for #39 applies. Git credentials are not implemented, but authinfo and netrc files, with and without .gpg extention, are checked. Please review, especially the hack to pass a pipe to load_file (maybe we need a warning if gpg is not in the PATH?).

timkay commented 11 years ago

Wouldn't it be better to simply do this:

$secrets_file ||= "gpg --decrypt $home/.$_.gpg|" if -e "$home/.$_.gpg";

and skip the whole clause below?

tzz commented 11 years ago

Then you couldn't do --secrets-file=/home/tzz/.awssecret.gpg. I wanted to be able to decode any credentials file, authinfo/netrc or "classic" style.

timkay commented 11 years ago

ahh. good point... I'll merge your code.

tzz commented 11 years ago

Thanks!