Skip to content

Commit

Permalink
Use standard AWS access key ENV VAR names
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava Maslennikov committed Mar 9, 2018
1 parent 1a71543 commit e9ed276
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ If you're looking for the same kind of tool, but for APT repositories, I can rec

1. You have python installed (2.6+).

1. You have your S3 credentials available in the `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` environment variables:
1. You have your S3 credentials available in the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables:

export AWS_ACCESS_KEY="key"
export AWS_SECRET_KEY="secret"
export AWS_ACCESS_KEY_ID="key"
export AWS_SECRET_ACCESS_KEY="secret"

## Installation

Expand All @@ -31,7 +31,7 @@ Use the provided `/test/test.sh` script:

vagrant up
vagrant ssh
AWS_ACCESS_KEY=xx AWS_SECRET_KET=yy BUCKET=zz ./test/test.sh
AWS_ACCESS_KEY_ID=xx AWS_SECRET_KET=yy BUCKET=zz ./test/test.sh

Also:

Expand All @@ -58,7 +58,7 @@ Have a `~/.rpmmacros` file ready with the following content:

Pass the `--sign` option to `rpm-s3`:

AWS_ACCESS_KEY="key" AWS_SECRET_KEY="secret" ./bin/rpm-s3 --sign my-app-1.0.0.x86_64.rpm
AWS_ACCESS_KEY_ID="key" AWS_SECRET_ACCESS_KEY="secret" ./bin/rpm-s3 --sign my-app-1.0.0.x86_64.rpm

### Import gpg key to install signed packages

Expand Down
6 changes: 3 additions & 3 deletions bin/rpm-s3
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ class FileGrabber(object):


def getclient(base, host_url):
if os.getenv('AWS_ACCESS_KEY'):
if os.getenv('AWS_ACCESS_KEY_ID'):
return boto.connect_s3(
os.getenv('AWS_ACCESS_KEY'),
os.getenv('AWS_SECRET_KEY'),
os.getenv('AWS_ACCESS_KEY_ID'),
os.getenv('AWS_SECRET_ACCESS_KEY'),
host=host_url,
calling_format=boto.s3.connection.OrdinaryCallingFormat()
).get_bucket(base.netloc)
Expand Down

0 comments on commit e9ed276

Please sign in to comment.