You are not logged in.

#1 2020-08-18 15:59:10

claudici
Member
Registered: 2020-07-28
Posts: 21

[SOLVED] Password Store and GPG: No Public Key

I have two separate GPG keys because I want different passphrases for my encrypted mail and password manager. Just a personal preference...

The keys have the same email address and name. Just thought I'd point that out.

When I get the GPG key id I want for the password manager (pass program) using the command

gpg --list-keys

and get this

Secret key is available.

sec  rsa2048/7EF13DE142C34828
     created: 2020-08-18  expires: never       usage: SC
     trust: ultimate      validity: ultimate
ssb  rsa2048/993F63E3D7F1004D
     created: 2020-08-18  expires: never       usage: E
[ultimate] (1). [NAME] <[EMAIL]>

then initialize the pass with

pass init .local/share/pass 7EF13DE142C34828

I get the error

gpg: .local/share/pass: skipped: No public key
gpg: [stdin]: encryption failed: No public key
arch-bbs: reencrypting to 993F63E3D7F1004D

for every password in the directory.

Ok, so 993F63E3D7F1004D is the subkey (arch-bbs is just the name of a password entry), but I don't think it's working because pass still isn't accepting the key passphrase for passwords.

I have tried importing the public keyring into gpg2 because apparently pass uses gpg2 AND making sure the keys in gpg and gpg2 have ultimate trust but I am still getting the same error.

Also, the .local/share/pass/.gpg-id file has the correct key ID in it.

Any suggestions?

EDIT: Encrypting a file via

gpg -r 7EF13DE142C34828 -e file

then decrypting it with

gpg -d file.gpg 

works as expected. I am prompted for the passphrase and I can see the contents afterwards. So I am totally confused now.

EDIT 2: Figured it out. Turns out I didn't need to specify the location of the directory when initializing the password store since it already exists. So the command I ran that worked was:

pass init 7EF13DE142C34828

I am stupid, lol.

Last edited by claudici (2020-08-18 16:41:31)

Offline

Board footer

Powered by FluxBB