Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove GPG key from GitHub

Tags:

git

github

I have a problem with my GPG key. I removed my GPG key from my PC and my account and now when I want to commit changes from my computer it says:

gpg: skipped "name ": secret key not available gpg: signing failed: secret key not available error: gpg failed to sign the data fatal: failed to write commit object

So how can I unset it from Git?


1 Answers

To remote a GPG key from GitHub, go to https://github.com/settings/keys and under GPG keys, select the one and remove it.

To remove it from Git, I believe @Mincong Huang's suggestion might work:

git config --global --unset user.signingkey

Then you can globally disable the GPG sign in key for commits

git config --global commit.gpgsign false
like image 125
Gabriel Caruso Avatar answered Feb 13 '26 13:02

Gabriel Caruso



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!