diff --git a/plugin/remote/github/helper.go b/plugin/remote/github/helper.go index 244b863a4..b6ea885b8 100644 --- a/plugin/remote/github/helper.go +++ b/plugin/remote/github/helper.go @@ -225,8 +225,7 @@ func CreateUpdateKey(client *github.Client, owner, name, title, key string) (*gi if k != nil { k.Title = github.String(title) k.Key = github.String(key) - var updated, _, err = client.Repositories.EditKey(owner, name, *k.ID, k) - return updated, err + client.Repositories.DeleteKey(owner, name, *k.ID) } return CreateKey(client, owner, name, title, key)