fix(be): don't return error when tring install non-ssh key

This commit is contained in:
Denis Gukov 2021-09-01 23:11:24 +05:00
parent b950dacd73
commit 3e223e2359

View File

@ -343,14 +343,14 @@ func (t *task) destroyKey(key db.AccessKey) error {
}
func (t *task) installKey(key db.AccessKey) error {
if key.Type != db.AccessKeySSH {
return nil
}
t.log("access key " + key.Name + " installed")
path := key.GetPath()
if key.Type != db.AccessKeySSH {
return fmt.Errorf("access key must be ssh key")
}
if key.SshKey.Passphrase != "" {
return fmt.Errorf("ssh key with passphrase not supported")
}