Browse Source

fix public will not be reused as public key after deleting as deploy key (#5671)

for-closed-social
Lunny Xiao 5 years ago
committed by techknowlogick
parent
commit
0b84b5ee49
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      models/ssh_key.go

+ 5
- 0
models/ssh_key.go View File

@ -844,6 +844,11 @@ func DeleteDeployKey(doer *User, id int64) error {
if err = deletePublicKeys(sess, key.KeyID); err != nil {
return err
}
// after deleted the public keys, should rewrite the public keys file
if err = rewriteAllPublicKeys(sess); err != nil {
return err
}
}
return sess.Commit()

Loading…
Cancel
Save