mirror of
https://github.com/restic/restic.git
synced 2025-03-30 00:00:14 +01:00
backend/s3: resolve credential retrieval deprecation
This commit is contained in:
parent
f88d5adaa2
commit
f8b481fd9b
1 changed files with 3 additions and 6 deletions
|
@ -131,14 +131,11 @@ func getCredentials(cfg Config, tr http.RoundTripper) (*credentials.Credentials,
|
||||||
&credentials.EnvMinio{},
|
&credentials.EnvMinio{},
|
||||||
&credentials.FileAWSCredentials{},
|
&credentials.FileAWSCredentials{},
|
||||||
&credentials.FileMinioClient{},
|
&credentials.FileMinioClient{},
|
||||||
&credentials.IAM{
|
&credentials.IAM{},
|
||||||
Client: &http.Client{
|
|
||||||
Transport: tr,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
client := &http.Client{Transport: tr}
|
||||||
|
|
||||||
c, err := creds.Get()
|
c, err := creds.GetWithContext(&credentials.CredContext{Client: client})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "creds.Get")
|
return nil, errors.Wrap(err, "creds.Get")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue