Keys not recognized after restoring from backup

Michael Prasuhn's Avatar

Michael Prasuhn

31 Dec, 2017 11:30 PM

I've restored the contents of ~/.gnupg from backups after a clean install on High Sierra 10.13.2, but none of my keys show up in GPG Keychain, or with gpg --list-secret-keys. I've attached a copy of my versions, and here's a list of all the files in my ~/.gnup directory:

├── S.gpg-agent
├── S.gpg-agent.browser
├── S.gpg-agent.extra
├── S.gpg-agent.ssh
├── crls.d
│   └── DIR.txt
├── gpg-agent.conf
├── gpg.conf
├── gpg.conf.bak
├── private-keys-v1.d
│   ├── 5C77AF33CF3A873945B808C675245ABC8A13D7AF.key
│   └── D0F915F0950AC0879B3E0442E76A88F77AD6DB1F.key
├── pubring.gpg
├── pubring.gpg~
├── pubring.kbx
├── pubring.kbx~
├── random_seed
├── secring.gpg
├── tofu.db
└── trustdb.gpg

Is there any trick to getting my keys to be recognized?

  1. 1 Posted by Michael Prasuhn on 12 Jan, 2018 05:09 AM

    Michael Prasuhn's Avatar

    After some digging around on Stackoverflow and elsewhere I was able to resolve this issue by deleting ~/.gnupg and the copying it from the backup again, and then running sudo chown -R $USER:staff ~/.gnupg before running any other GPG commands. I suspect that some user IDs were off or something, even though the user name was the same.

  2. 2 Posted by dave on 12 Jan, 2018 03:13 PM

    dave's Avatar

    This comment was split into a new private discussion: GPGMail: Keys not recognized after restoring from backup

    i am having an issue similar to michael above. I have restored from a backup andGPG asking me for the pasphrase, which i know and enter and it tells me its incorrect. please advise.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • 2017-12-31_at_6.26_PM.png 103 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac