mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 15:30:06 +08:00
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
This commit is contained in:
parent
53868ef4e1
commit
6092fe2aaa
|
@ -2896,6 +2896,7 @@ func s3Connection(ctx context.Context, opt *Options, client *http.Client) (*s3.S
|
||||||
case v.AccessKeyID == "" && v.SecretAccessKey == "":
|
case v.AccessKeyID == "" && v.SecretAccessKey == "":
|
||||||
// if no access key/secret and iam is explicitly disabled then fall back to anon interaction
|
// if no access key/secret and iam is explicitly disabled then fall back to anon interaction
|
||||||
cred = credentials.AnonymousCredentials
|
cred = credentials.AnonymousCredentials
|
||||||
|
fs.Debugf(nil, "Using anonymous credentials - did you mean to set env_auth=true?")
|
||||||
case v.AccessKeyID == "":
|
case v.AccessKeyID == "":
|
||||||
return nil, nil, errors.New("access_key_id not found")
|
return nil, nil, errors.New("access_key_id not found")
|
||||||
case v.SecretAccessKey == "":
|
case v.SecretAccessKey == "":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user