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

Incorrect error message when access key env vars missing #997

Open
austinbutler opened this issue Aug 23, 2018 · 0 comments
Open

Incorrect error message when access key env vars missing #997

austinbutler opened this issue Aug 23, 2018 · 0 comments

Comments

@austinbutler
Copy link

I had though I'd added my temporary AWS keys as env vars, but I hadn't, and when I went to use s3cmd I got the following errors:

ERROR: .s3cfg: None
ERROR: Configuration file not available.
ERROR: Consider using --configure parameter to create one.

I went looking to see if the configuration file was missing, but it wasn't. It's still there, with the access_token and such intentionally left blank in order to pull from the env vars.

From digging in a little bit, it seems this is because the error handling lumps a socket timeout and resulting 400 error from AWS into the same IOError you'd get if the file were missing. The timeout is from the call to self.role_config() in the Config class' init method, which for me results in a socket.timeout exception since I am running on my local machine versus an instance.

I may give a PR a go.

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

No branches or pull requests

1 participant