Skip to content

Instantly share code, notes, and snippets.

@JoeGermuska
Last active March 12, 2016 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeGermuska/0a90610017b829d547d8 to your computer and use it in GitHub Desktop.
Save JoeGermuska/0a90610017b829d547d8 to your computer and use it in GitHub Desktop.
Fixing Keybase/GPG 'Legacy key' errors

I had used keybase successfully on my Mac. After some time, I went to track someone and got this error:

error: `gpg` exited with code 2
warn: gpg: error reading key: Legacy key

I had no luck googling for answers, but a @mtigas suggested that I try

gpg2 --list-secret-keys

That revealed a very old dsa1024 key I had installed (expired in 2005). I tried

gpg2 --delete-secret-keys 998573AB

but it failed with

gpg: 998573AB: delete key failed: No pinentry

I was able to use Mac OS GPGTools to delete the key, and after that, regular keybase commands worked.

Hopefully this will help someone else with the same problem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment