You are not logged in.

#1 2017-11-15 17:22:35

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

GPG error encrypting [SOLVED]

I just re-built a system and imported my gpg keys.
When I test to see if every thing went well I get:
gpg -k

/home/ralvez/.gnupg/pubring.kbx
-------------------------------
pub   dsa3072 2013-10-16 [SCA]
      74A4E6D3063DAE756D4B403B3C018C2346790634
uid           [ultimate] Ricardo Alvez <ricardo.alvez@humber.ca>
uid           [ultimate] [jpeg image of size 2503]
sub   elg4096 2013-10-16 [E] [expires: 2018-11-10]
sub   elg4096 2017-11-15 [E] [expires: 2019-11-15]

then gpg -K

/home/ralvez/.gnupg/pubring.kbx
-------------------------------
sec   dsa3072 2013-10-16 [SCA]
      74A4E6D3063DAE756D4B403B3C018C2346790634
uid           [ultimate] Ricardo Alvez <ricardo.alvez@humber.ca>
uid           [ultimate] [jpeg image of size 2503]
ssb   elg4096 2013-10-16 [E] [expires: 2018-11-10]
ssb   elg4096 2017-11-15 [E] [expires: 2019-11-15]

So, it looks to me that secret and public keys are OK.
However, when I try to edit a password in pass this is what I get.

pass edit services/webmail
gpg: CDD6F55153140274: skipped: No public key
gpg: /dev/shm/pass.qvlJgvYxiWweZ/l9UYAF-services-webmail.txt: encryption failed: No public key
GPG encryption failed. Would you like to try again? [y/N]

I've added a new encryption sub key but that did not work either.
Am I doing something  wrong or just missing something? hmm

Thanks.

P.S:  If I want to **see** what's stored in pass, such as: "pass services/webmail" it will show the encrypted content just fine.

Last edited by ralvez (2017-11-15 19:27:56)

Offline

#2 2017-11-15 17:33:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: GPG error encrypting [SOLVED]

It looks like pass is trying to use a different key. What's in .gpg-id? Does the fingerprint match your key?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-11-15 19:23:03

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: GPG error encrypting [SOLVED]

@jasonwryan,

Thanks for your reply.
I, actually, tested that and I think it could be the source of the problem. I'm not so sure as to the solution.
This is what I did:
In the folder .password_store I have a file .gpg-id which has two key ids.
The first is a match for my public key, the second I'm not sure what it is but I do not have nothing to match it.
I commented out the second and gave the edit a try but no luck. sad

I also tried copying my .gpg-id to __gpg-id and then generated a new key with pass init ~/.password_store/.gpg-id but that
also failed.

Any other ideas?

Thanks again.

R

Offline

#4 2017-11-15 19:27:34

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: GPG error encrypting [SOLVED]

@jasonwryan,

OK. I had a new idea. I actually deleted the second line and ... happy moment !! It now works.  smile
Thanks for your help!!

R.

Offline

#5 2017-11-15 19:29:10

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: GPG error encrypting [SOLVED]

Weird. Add set -x to pass and see if that provides more clues. The fact that you had a second, random ID is odd, pass must have picked it up from your agent or environment - that is where I would look next.

# edit: one-hand typing with cat on my lap slowed me down smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB