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. Support Staff 2 Posted by Steve on 19 Jan, 2018 01:33 PM

    Steve's Avatar

    Hi Michael,

    welcome to the GPGTools support platform. Sorry you were having problems using GPG Suite. We've seen a few rare cases, where keys were not working as expected after the 2.2 transition. That is why before migrating any keys, a backup was created.

    It's hard to say what specifically went wrong in your case.

    Glad, this is solved for you now already. I'm closing this discussion. Should you need further assistance or have questions you can re-open this discussion here or open a new one any time.


  3. Steve closed this discussion on 19 Jan, 2018 01:33 PM.

Comments are currently closed for this discussion. You can start a new one.

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