Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pass not working with old ~/.gnupg
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
2huguy
n00b
n00b


Joined: 03 Jan 2024
Posts: 1

PostPosted: Wed Jan 03, 2024 8:35 pm    Post subject: Pass not working with old ~/.gnupg Reply with quote

I wanted to switch to gentoo a few days ago and I use pass as my password manager so I created a backup of the 2 directories: ~/.gnupg and ~/.password-store in a xz tar archive on an external drive, without exporting my gpg private keys, and wiped my main drive, however after extracting the archive and copying the directories to my home directory, I cannot view my old pass entries. For example, I type
Code:
pass steam
but an error message comes up instead of pinentry:
Code:
gpg: decryption failed: No secret key

I do have pinentry installed.
I can remove ~/.gnupg and start from scratch by creating a new ~/.gnupg with
Code:
gpg --full-generate-key

then pinentry starts working and I can create new pass entries and do what I want with them, but I cannot view old pass entries, the same error message comes up.

This is my gpg.conf:
Code:
use-agent

This is my gpg-agent.conf:
Code:
default-cache-ttl 3153600000
pinentry-program /usr/bin/pinentry-curses
allow-loopback-pinentry

gpg --list-secret-keys shows no output.
In ~/.gnupg/private-keys-v1.d/ I do have 2 .key files with really long names.

I really think I messed up by not exporting my private keys beforehand and that there's nothing I can do now but if someone is able to help me out, I'll really appreciate it.
Back to top
View user's profile Send private message
GoingDown
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2004
Posts: 117
Location: Finland

PostPosted: Thu Jan 04, 2024 8:19 am    Post subject: Reply with quote

Only thing which comes to my mind is to download any (older) live DVD/USB Linux image, install gnupg there, copy old dir, then export your keys. This should be possible on most live Linux distributions.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21758

PostPosted: Thu Jan 04, 2024 3:54 pm    Post subject: Reply with quote

Is the problem that the files representing the private keys are no longer present, or that you have private key files that you cannot process with the current version of GnuPG? If the former, can you recover those keys from your last full system backup (rather than the minimal archive created just before migration)? The keys change rarely, so even a backup from a few months ago is likely sufficient.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum