Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

s3: emit a debug message if anonymous credentials are in use

Nick Craig-Wood6092fe2aaafb
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 == "":