mirror of
https://github.com/restic/restic.git
synced 2025-06-12 07:18:29 +00:00
backend/s3: resolve credential retrieval deprecation
This commit is contained in:
parent
f88d5adaa2
commit
f8b481fd9b
@ -131,14 +131,11 @@ func getCredentials(cfg Config, tr http.RoundTripper) (*credentials.Credentials,
|
||||
&credentials.EnvMinio{},
|
||||
&credentials.FileAWSCredentials{},
|
||||
&credentials.FileMinioClient{},
|
||||
&credentials.IAM{
|
||||
Client: &http.Client{
|
||||
Transport: tr,
|
||||
},
|
||||
},
|
||||
&credentials.IAM{},
|
||||
})
|
||||
client := &http.Client{Transport: tr}
|
||||
|
||||
c, err := creds.Get()
|
||||
c, err := creds.GetWithContext(&credentials.CredContext{Client: client})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "creds.Get")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user