Error: IncompleteSignature

Suddenly I’m getting these errors with my Github action https://github.com/kaihendry/dabase.com/blob/master/.github/workflows/hugo.yml

Invalidating CloudFront CDN...

Error: IncompleteSignature: '***/20200717/us-east-1/cloudfront/aws4_request' not a valid key=value pair (missing equal-sign) in Authorization header: 'AWS4-HMAC-SHA256 Credential= ***/20200717/us-east-1/cloudfront/aws4_request, SignedHeaders=content-length;host;x-amz-date, Signature=eea5deeb932193d6a63550959ac5f5aac1055bf2bc4da89b6f2baae72895ee1b'.

status code: 403, request id: 60e2d7aa-7a01-4b90-861c-90b16531a817

    Failed to invalidate CloudFront CDN: IncompleteSignature: '***/20200717/us-east-1/cloudfront/aws4_request' not a valid key=value pair (missing equal-sign) in Authorization header: 'AWS4-HMAC-SHA256 Credential= ***/20200717/us-east-1/cloudfront/aws4_request, SignedHeaders=content-length;host;x-amz-date, Signature=eea5deeb932193d6a63550959ac5f5aac1055bf2bc4da89b6f2baae72895ee1b'.

    status code: 403, request id: 60e2d7aa-7a01-4b90-861c-90b16531a817

##[error]Process completed with exit code 255.

Anyone know what is the cause of this? Amazon? My keys? Hugo? CC @peaceiris

According to https://github.com/kaihendry/dabase.com/runs/879943844?check_suite_focus=true it’s HUGO_VERSION=0.74.1 … I’m not sure how to downgrade/bisect. Just quickly checking if anyone else has the same issue before digging deeper.

I don’t see a problem locally.

[hendry@t480s dabase.com]$ hugo version
Hugo Static Site Generator v0.73.0/extended linux/amd64 BuildDate: unknown
[hendry@t480s dabase.com]$ hugo deploy --invalidateCDN=true
Deploying to target "dabase" (s3://dabase.com?region=ap-southeast-1)
Identified 0 file(s) to upload, totaling 0 B, and 1 file(s) to delete.
WARN 2020/07/17 08:26:41 Skipping 1 deletes because it is more than --maxDeletes (0). If this is expected, set --maxDeletes to a larger number, or -1 to disable this check.
Success!
Invalidating CloudFront CDN...
Success!

Thank you!

We can use a specific version of Hugo like the following.

- container: peaceiris/hugo
+ container: peaceiris/hugo:v0.73.0

Your latest succeed build is 4 days ago and the Hugo v0.74.1 has been released 3 days ago. Let’s figure out which version of Hugo has a problem first of all. (You could deploy with the Hugo v0.73.0 from the local environment and failed on GitHub Actions with Hugo v0.74.1 peaceiris/hugo:latest. The Hugo v0.74.1 faces this problem I think.)

1 Like

Thank you @peaceiris

Rolled back and it seems to work now: https://github.com/kaihendry/dabase.com/commit/c7ef84734d2c041d942364b5111655e1397c8526

So there is some issue introduced by v0.74.1? So an issue should now be created here? https://github.com/gohugoio/hugo/issues/new?assignees=&labels=bug&template=bug_report.md

1 Like

Yes! I recommend you to do it.