mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-24 09:06:03 +00:00
don't forget password on connection errors (fixes #783)
This commit is contained in:
@@ -66,7 +66,7 @@ export class SSHService {
|
|||||||
privateKey = (await fs.readFile(privateKeyPath)).toString()
|
privateKey = (await fs.readFile(privateKeyPath)).toString()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log('Could not read the private key file')
|
log('Could not read the private key file')
|
||||||
this.toastr.warning('Could not read the private key file')
|
this.toastr.error('Could not read the private key file')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (privateKey) {
|
if (privateKey) {
|
||||||
@@ -100,7 +100,9 @@ export class SSHService {
|
|||||||
this.zone.run(resolve)
|
this.zone.run(resolve)
|
||||||
})
|
})
|
||||||
ssh.on('error', error => {
|
ssh.on('error', error => {
|
||||||
this.passwordStorage.deletePassword(session.connection)
|
if (error.message === 'All configured authentication methods failed') {
|
||||||
|
this.passwordStorage.deletePassword(session.connection)
|
||||||
|
}
|
||||||
this.zone.run(() => {
|
this.zone.run(() => {
|
||||||
if (connected) {
|
if (connected) {
|
||||||
this.toastr.error(error.toString())
|
this.toastr.error(error.toString())
|
||||||
|
Reference in New Issue
Block a user