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) (#5685)
  • Loading branch information
lunny authored and techknowlogick committed Jan 10, 2019
1 parent 30560b0 commit 1c4293b
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 @@ -826,6 +826,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 1c4293b

Please sign in to comment.