roddhjav / pass-tomb

A pass extension that helps you keep the whole tree of passwords encrypted inside a Tomb.
https://www.passwordstore.org
GNU General Public License v3.0
381 stars 30 forks source link

Unable to edit a password entry #9

Closed pawamoy closed 7 years ago

pawamoy commented 7 years ago

I'm not sure it is related to pass-tomb, but since I used it to create my password store and I can't find an issue tracker for pass, I'm posting this issue in this repo. Maybe @zx2c4 or @jaromil could have an idea on what's going on?

So the issue is that I can't edit a password entry. I can show it, copy it in clipboard, etc., but not edit it.

Show ok:

$ pass show bandyou
****************** (redacted)

Update ok (with pass-update extension):

$ pass update bandyou
Changing password for bandyou
****************** (redacted)
Are you ready to generate a new password? [y/N] 

Edit not ok:

$ pass edit bandyou
Error: You must run:
    pass init your-gpg-id
before you may use the password store.

============================================
= pass: the standard unix password manager =
... and the rest of the banner and usage message

Edit is not working either with other password entries.

pawamoy commented 7 years ago

I suspect the issue is coming from the fact I'm ignoring the file .gpg-id in .gitignore. Shouldn't I? I initialized the git repository afterwards so I wasn't sure what files needed to by tracked or not, I just tracked all the passwords and none of the following:

.gpg-id
.host
.last
.tty
.uid

Setting a random value in .gpg-id will allow me to show the passwords, and open them for edition in vim, but not save the modifications:

gpg: .password-store: skipped: No public key
gpg: /dev/shm/pass.NCV4OwPHno5By/su26O9-bandyou.txt: encryption failed: No public key
GPG encryption failed. Would you like to try again? [y/N]
roddhjav commented 7 years ago

Can you provide the exact commands you did in order to set up your password tomb? Moreover, for pass-tomb commands please activate the verbose mode using -v.

Setting a random value in .gpg-id will allow me to show the passwords, and open them for edition in vim, but not save the modifications:

.gpg-id should have your GPG key ID, the same you used to generate the password tomb. Otherwise pass will never be able to decrypt anything.

pawamoy commented 7 years ago

I guess I did just as explained in the README.

Indeed I put back my GPG ID (I didn't remember I had to put an ID and not a file path), and it is now working again. I don't know what happened exactly but I think the contents of .gpg-id were changed somehow. I'll check that if it happens again, meanwhile I don't think I can do more :/ Thanks for your help!