You are not logged in.
Hey!
Okay, so my laptop broke and I sent it in for warranty. Long story short: it came back, but the disk was wiped. So I set up arch again, smooth sailing.
Now I wanted to bring my .password-store to the laptop and I exported my secret-key on my main desktop:
gpg2 --export-secret-keys > pass-key.gpg
I move this to a folder ~/test
I then brought the folder to the laptop and also moved over .password-store ... I did this via syncthing.
On the laptop I do:
gpg2 --import test/pass-key.gpg
This works.
I see the key via
gpg2 --list-secret-keys
Now when I enter pass, I can see my password structure. I try to decrypt a password and get:
gpg: public key decryption failed: No secret key
gpg: decryption failed: No secret key
Hm, I must have made a mistake.
So I enter the same thing on my desktop for another password.
Same error!
I begin to slightly panic...
I manually kill my gpg-agent, I even reboot the desktop... to no avail.
I can't decrypt my passwords any longer.
Is there any chance I can find out what went wrong AND fix it?
There is a myriad of passwords in there... I never had this problem, but I think it started with using syncthing for this and doing a pass init and pass git init on the laptop before I synced (and it synced back, it wasn't one way )
Any ideas?
Last edited by Humar (2024-10-08 18:02:47)
Offline
Ah, interesting, it's only all older passwords... they appear to be encrypted with an RSA key I don't have... I wonder how that happened.
Everything I did this year was encrypted with another key and that one I have, so it works just fine... oO
Offline
Okay, so it has something to do with a git push I did on the password-store...
When I go back to an older commit I can decrypt everything just fine!
Offline
Yes, so the problem is definitely coming from this commit:
> Reencrypt password store using new GPG id NAME_OF_NEW_ID.
I wonder how this worked before I pushed the changes... I think the problem was that I reencrypted and had a merge conflict and just pulled and... no idea how it really happened but I can access most passwords just fine, so there is that.
I'll start by exporting all of them to a secure location and then go from there.
Thanks anyway!
Offline
two line come to my mind:
never do your own crypto
and
no backup no pity
now that you experienced what can go wrong I recommend using a proper password manager and create a proper backup (and test that often!)
Offline
I didn't do my own crypto, I use a proper password manager.
But I can be blamed for the backup.
Fixed everything with git reflog though
Offline
I use a proper password manager.
doesn'T look like it - you did some changes - so something YOU control
what I mean by "don't do your own crypto and use a proper manager": don'T do ANYTHING yourself but ONLY use the manager
as whatever you did (or still do) reads like you changed some code you control which broke - doesn't sound to me you are using some proper manager
Offline
I use a proper manager, I just misused it. It was all my fault, not the fault of the software. Errare humanum est.
I use passwordstore with git integrations.
Anyway: I NEVER rolled my own crypto.
And with that I am out. Thanks for chiming in, have a wonderful week!
Offline