Merge pull request #5526 from qiuming-best/insecurity-skip-fix

fix restic backup failure with self-signed certification backend storage
This commit is contained in:
lyndon
2022-11-01 15:29:43 +08:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -0,0 +1 @@
fix restic backup failure with self-signed certification backend storage

View File

@@ -147,7 +147,9 @@ func (rp *resticProvider) RunBackup(
snapshotIdCmd := restic.GetSnapshotCommand(rp.repoIdentifier, rp.credentialsFile, tags)
snapshotIdCmd.Env = rp.cmdEnv
snapshotIdCmd.CACertFile = rp.caCertFile
if len(rp.extraFlags) != 0 {
snapshotIdCmd.ExtraFlags = append(snapshotIdCmd.ExtraFlags, rp.extraFlags...)
}
snapshotID, err := restic.GetSnapshotID(snapshotIdCmd)
if err != nil {
return "", false, errors.WithStack(fmt.Errorf("error getting snapshot id with error: %v", err))