From 6092fe2aaafb089e4d2a56d55fedecc68f79aa88 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 19 Oct 2023 16:51:15 +0100 Subject: [PATCH] s3: emit a debug message if anonymous credentials are in use This can indicate the user is expecting `env_auth=true` to be the default so we say that in the debug message. See: https://forum.rclone.org/t/rclone-with-amazon-s3-access-point/42411 --- backend/s3/s3.go | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index d7884ce24..938c9e9e1 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -2896,6 +2896,7 @@ func s3Connection(ctx context.Context, opt *Options, client *http.Client) (*s3.S case v.AccessKeyID == "" && v.SecretAccessKey == "": // if no access key/secret and iam is explicitly disabled then fall back to anon interaction cred = credentials.AnonymousCredentials + fs.Debugf(nil, "Using anonymous credentials - did you mean to set env_auth=true?") case v.AccessKeyID == "": return nil, nil, errors.New("access_key_id not found") case v.SecretAccessKey == "":