Skip to content

Commit

Permalink
fix public will not be reused as public key after deleting as deploy …
Browse files Browse the repository at this point in the history
…key (#5671)
  • Loading branch information
lunny authored and techknowlogick committed Jan 9, 2019
1 parent 530c2b8 commit 0b84b5e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions models/ssh_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 0b84b5e

Please sign in to comment.