docpad-plugin-sunny icon indicating copy to clipboard operation
docpad-plugin-sunny copied to clipboard

Not detecting config variables from env

Open vjpr opened this issue 12 years ago • 6 comments

I've set my variables properly and this is the message I get:

Sunny plugin getting config from environment...
Found 1 configurations in config file.
One of the config variables is missing. Printing config:
{ provider: undefined,
  account: undefined,
  secretKey: undefined,
  ssl: undefined }
Container is undefined
info: Generated all 37 files in 0.62 seconds
info: The action completed successfully
Received error trying to connect to provider: 
 Error: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>TemporaryRedirect</Code><Message>Please re-send this request to the specified temporary endpoint. Continue to use the original request endpoint for future requests.</Message><RequestId>[redacted]</RequestId><Bucket>[redacted]</Bucket><HostId>[redacted]</HostId><Endpoint>[redacted].s3-ap-southeast-2.amazonaws.com</Endpoint></Error>

vjpr avatar Jan 14 '13 00:01 vjpr

Have you checked that your variables are correct case and such? The environment functionality is basically just a for loop.

It runs through each prefix you've specified and goes process.env["#{prefix}PROVIDER"], process.env["#{prefix}SECRETKEY"] etc.

Also note that it doesn't add underscores.

bobobo1618 avatar Jan 14 '13 02:01 bobobo1618

Seems to be an issue with node-sunny and the TemporaryRedirect not being handled.

vjpr avatar Jan 14 '13 03:01 vjpr

I just implemented the functionality to change the authUrl as Ryan suggested. Check the Readme ;)

bobobo1618 avatar Jan 14 '13 04:01 bobobo1618

Thanks. Maybe add a note that if the user receives a TemporaryRedirect error they should make the authUrl the Endpoint mentioned in the error message without the bucket name at the start.

On Mon, Jan 14, 2013 at 3:18 PM, bobobo1618 [email protected]:

I just implemented the functionality to change the authUrl as Ryan suggested. Check the Readme ;)

— Reply to this email directly or view it on GitHubhttps://github.com/bobobo1618/docpad-plugin-sunny/issues/5#issuecomment-12206380.

vjpr avatar Jan 14 '13 04:01 vjpr

Good idea. And done.

bobobo1618 avatar Jan 14 '13 04:01 bobobo1618

The authUrl should not contain the bucket name. The documentation is wrong. Tiny fix: remove the [redacted]. part.

Can be fixed by setting the authUrl for the config that's having the problem to the endpoint given in the error. In this case, you could add authUrl: '[redacted].s3-ap-southeast-2.amazonaws.com' to your configuration.

vjpr avatar Apr 29 '13 07:04 vjpr