mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 15:29:28 +01:00
fix(be): don't return error when tring install non-ssh key
This commit is contained in:
parent
b950dacd73
commit
3e223e2359
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user