sftp: Only connect once for repository creation

This is especially useful if ssh asks for a password or if closing the
initial connection could return an error due to a problematic server
implementation.
This commit is contained in:
Michael Eischer
2022-08-20 19:49:30 +02:00
parent f7808245aa
commit cf0a8d7758
2 changed files with 30 additions and 25 deletions

View File

@@ -0,0 +1,11 @@
Enhancement: only open connection once for `init` command using sftp backend
The `init` command using the sftp backend used to connect twice to the
repository. This can be inconvenient if the user must enter a password or cause
`init` to fail if the server does not correctly close the first sftp
connection.
This has been fixed by reusing the initial sftp connection.
https://github.com/restic/restic/issues/2152
https://github.com/restic/restic/pull/3882