s3cmd icon indicating copy to clipboard operation
s3cmd copied to clipboard

The config prompt for host_bucket is very hard to understand

Open huyz opened this issue 3 years ago • 1 comments

Seeing this for the first time during s3cmd --configure was incomprehensible to me:

Use "%(bucket)s.s3.amazonaws.com" to the target Amazon S3. "%(bucket)s" and "%(location)s" vars can be used
if the target S3 system supports dns based buckets.
DNS-style bucket+hostname:port template for accessing a bucket [%(bucket)s.s3.amazonaws.com]:

So I did the only sensible thing I could do then: just hit ENTER.

But hitting ENTER only makes sense if you're using AWS S3 and not another S3-compatible provider. What happened to me later is that a general ls worked but a deeper ls failed. So I had to retrace my steps back to this host_bucket configuration.

  1. The prompt should be reworded to be more intelligible to first-time users
  2. The default, if the user hits ENTER, should:
  • be set as it is right now if host_base in the previous prompt hasn't been changed from s3.amazonaws.com
  • default to the same value as host_base from the prior prompt otherwise (because I assume other providers do not support %(bucket)s.%{host_base} (at least it didn't for my non-AWS S3 provider))

huyz avatar Jul 14 '22 04:07 huyz

There also appears to be a bug where %(location)s is not substituted.

mcassaniti avatar Sep 17 '23 05:09 mcassaniti