docpad-plugin-sunny
docpad-plugin-sunny copied to clipboard
Not detecting config variables from env
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>
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.
Seems to be an issue with node-sunny and the TemporaryRedirect not being handled.
I just implemented the functionality to change the authUrl as Ryan suggested. Check the Readme ;)
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.
Good idea. And done.
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.