mirror of
https://github.com/restic/restic.git
synced 2025-10-09 18:02:28 +00:00
s3: Add warning if key ID or secret is empty
Also add debug message if no credential types are available. Closes #2388
This commit is contained in:
@@ -69,6 +69,15 @@ func open(ctx context.Context, cfg Config, rt http.RoundTripper) (*Backend, erro
|
||||
},
|
||||
})
|
||||
|
||||
c, err := creds.Get()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "creds.Get")
|
||||
}
|
||||
|
||||
if c.SignerType == credentials.SignatureAnonymous {
|
||||
debug.Log("using anonymous access for %#v", cfg.Endpoint)
|
||||
}
|
||||
|
||||
options := &minio.Options{
|
||||
Creds: creds,
|
||||
Secure: !cfg.UseHTTP,
|
||||
|
Reference in New Issue
Block a user