Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excon::Error::Forbidden: Expected(200) <=> Actual(403 Forbidden) #379

Open
Haseeb717 opened this issue Feb 25, 2019 · 3 comments
Open

Excon::Error::Forbidden: Expected(200) <=> Actual(403 Forbidden) #379

Haseeb717 opened this issue Feb 25, 2019 · 3 comments

Comments

@Haseeb717
Copy link

Haseeb717 commented Feb 25, 2019

When I try to async assets with s3 using command AssetSync.sync or rake assets:precompile

This throw an error

Excon::Error::Forbidden: Expected(200) <=> Actual(403 Forbidden)
excon.error.response

:body => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>

S3 bucket policy is

{
"Id": "xxx",
"Version": "2012-10-17",
"Statement": [
    {
        "Sid": "xxx",
        "Action": [
            "s3:ListBucket"
        ],
        "Effect": "Allow",
        "Resource": "arn:aws:s3:::static-assets",
        "Principal": "*"
    },
    {
        "Sid": "xxx",
        "Action": [
            "s3:GetObject",
            "s3:GetObjectAcl",
            "s3:PutObject",
            "s3:PutObjectAcl"
        ],
        "Effect": "Allow",
        "Resource": "arn:aws:s3:::static-assets/*",
        "Principal": "*"
    }
]
}

How to fix this issue?

@PikachuEXE
Copy link
Member

I think SignatureDoesNotMatch is not related to us
Since this gem just uses fog to upload files
For AWS try to find solultion in fog-aws

@Haseeb717
Copy link
Author

Can we use it without fog-aws

@PikachuEXE
Copy link
Member

If you use AWS then I think fog-aws should be required

https://github.com/AssetSync/asset_sync/blob/v2.6.0/lib/asset_sync/storage.rb
This gem mostly use Fog interface to upload files
You can try to upload one file using same interface without fog-aws and see what happens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@PikachuEXE @Haseeb717 and others