krobertson / deb-s3

Easily create and manage an APT repository on S3 -- NO LONGER MAINTAINED
MIT License
482 stars 148 forks source link

The authorization header is malformed; the Credential is mal-formed; expecting "<YOUR-AKID>/YYYYMMDD/REGION/SERVICE/aws4_request". #157

Closed drnic closed 6 years ago

drnic commented 6 years ago

Installing deb-s3 0.10 + its aws dependencies and I'm now getting the following error. I'm unsure when this error began in our pipeline as the pipeline itself was deleted + moved around so we lost build history.

Ideas for debugging?

+ deb-s3 upload bosh-bootloader_6.10.3_amd64.deb --bucket apt.starkandwayne.com --sign 3EC358C3EB9C4... '--gpg-options=--digest-algo SHA256'
>> Retrieving existing manifests
Traceback (most recent call last):
    19: from /usr/local/bin/deb-s3:23:in `<main>'
    18: from /usr/local/bin/deb-s3:23:in `load'
    17: from /var/lib/gems/2.5.0/gems/deb-s3-0.10.0/bin/deb-s3:9:in `<top (required)>'
    16: from /var/lib/gems/2.5.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
    15: from /var/lib/gems/2.5.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
    14: from /var/lib/gems/2.5.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
    13: from /var/lib/gems/2.5.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
    12: from /var/lib/gems/2.5.0/gems/deb-s3-0.10.0/lib/deb/s3/cli.rb:179:in `upload'
    11: from /var/lib/gems/2.5.0/gems/deb-s3-0.10.0/lib/deb/s3/release.rb:30:in `retrieve'
    10: from /var/lib/gems/2.5.0/gems/deb-s3-0.10.0/lib/deb/s3/utils.rb:68:in `s3_read'
     9: from /var/lib/gems/2.5.0/gems/aws-sdk-core-2.11.135/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
     8: from /var/lib/gems/2.5.0/gems/aws-sdk-core-2.11.135/lib/seahorse/client/request.rb:70:in `send_request'
     7: from /var/lib/gems/2.5.0/gems/aws-sdk-core-2.11.135/lib/seahorse/client/plugins/response_target.rb:21:in `call'
     6: from /var/lib/gems/2.5.0/gems/aws-sdk-core-2.11.135/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
     5: from /var/lib/gems/2.5.0/gems/aws-sdk-core-2.11.135/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in `call'
     4: from /var/lib/gems/2.5.0/gems/aws-sdk-core-2.11.135/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
     3: from /var/lib/gems/2.5.0/gems/aws-sdk-core-2.11.135/lib/aws-sdk-core/plugins/s3_accelerate.rb:34:in `call'
     2: from /var/lib/gems/2.5.0/gems/aws-sdk-core-2.11.135/lib/aws-sdk-core/plugins/s3_dualstack.rb:24:in `call'
     1: from /var/lib/gems/2.5.0/gems/aws-sdk-core-2.11.135/lib/aws-sdk-core/plugins/s3_sse_cpk.rb:19:in `call'
/var/lib/gems/2.5.0/gems/aws-sdk-core-2.11.135/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call': The authorization header is malformed; the Credential is mal-formed; expecting "<YOUR-AKID>/YYYYMMDD/REGION/SERVICE/aws4_request". (Aws::S3::Errors::AuthorizationHeaderMalformed)
drnic commented 6 years ago

Issue resolved. I had switched access key & secret key in my configuration. Therefore the Credential had a secret key in it; but is supposed to have an access key in it.

krobertson commented 6 years ago

@drnic glad you got it sorted... I handed over further development after 0.9 to someone else, but never updated the readme, they are working off of their own fork of the repo, and they didn't update the gemspec either.

I'll likely send them a PR to update the gemspec for the next version. Their fork is here: https://github.com/optanix/deb-s3