I saw gopass on Hacker News and thought I would check it out. I actually plan on doing a PR for #4, but I have experienced an issue I want to raise here. Perhaps someone can expand further on this.
$ gopass insert world
Enter password for world:
Failed to restore terminal: errno 0
Retype password for world:
Failed to restore terminal: errno 0
gopass: Encrypting world for these recipients:
- 0xB058C2BF639F134B - Mike C (Hi) <[email protected]>
Do you want to continue? [Y/n]:
error: gpg failed to sign the data
fatal: failed to write commit object
Error: failed to committ files to git: exit status 128
$ gopass show world
hello
So I insert a secret and it seems to fail, but then I'm able to retrieve it. The secret is present in the .password-store as a .gpg file and is indeed encrypted. Any thoughts on the errors here?
Versions:
Please take a look at the FAQ.
https://www.justwatch.com/gopass/faq/
I think that's exactly the problem, right?! 😊
@metalmatze the FAQ solves part of the problem, thanks for that.
but the error Failed to restore terminal: errno 0 still remains
I can confirm this bug. It happend to me right now on ArchLinux.
$ gopass insert foo
Enter password for foo:
Failed to restore terminal: errno 0
Retype password for foo:
Failed to restore terminal: errno 0
gopass: Encrypting foo for these recipients:
- 0xB1C7DF661ABB2C1A - Matthias Loibl <[email protected]>
Do you want to continue? [Y/n]:
[master bd0cf1f] Save secret to foo.
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 foo.gpg
The bug is the same i discover on #17
Change the .git/config solve the probleme
[edit for clarity]
I was seeing the same problem:
Error: failed to committ files to git: exit status 128
(ps, #27 fixes the typo...)
In addition to the FAQ cited above, it turned out that I had used one form of my company email when creating the GPG key ([email protected]) and had a different form in my ~/.gitconfig [user] section ([email protected]).
Changing the email address in my ~/.gitconfig to match the one I used in the key allowed things to complete successfully.
Seems like I should pick one form and stick with it...
I'm facing this bug as well. My setup is identical to @mrcrilly
I also tried the FAQ, change signingkey in git config and change gpg email as @hartzell mentioned as well but no luck.
➜ ~ gopass insert foo/bar1
Enter password for foo/bar1:
Failed to restore terminal: errno 0
Retype password for foo/bar1:
Failed to restore terminal: errno 0
gopass: Encrypting foo/bar1 for these recipients:
- 0x09674B0D7D0EDA9C - John <[email protected]>
Do you want to continue? [Y/n]: y
error: gpg failed to sign the data
fatal: failed to write commit object
Error: failed to committ files to git: exit status 128
OSX 10.11.6 El Capitan
FYI, for anyone like me who didn't read the homebrew output of installing pinentry-mac as required in the FAQ
You need to create a gpg-agent.conf file and set the pinentry-program
vim ~/.gnupg/gpg-agent.conf
# insert
pinentry-program /usr/local/bin/pinentry-mac
# save
This fixes a lot of errors, as by default GPG is trying to use the pinentry-ncurses and gopass can't use it as of 1.0.1. Setting the pinentry-program uses the Mac pop-up window to prompt for password
This cleared the show and insert (exit status 128) errors I was having.
````bash
gopass show bar
You need a passphrase to unlock the secret key for
user: "James Boswell
2048-bit ELG key, ID
1234
````
gopass insert foo
Enter password for foo:
Failed to restore terminal: errno 0
Retype password for foo:
Failed to restore terminal: errno 0
gopass: Encrypting foo for these recipients:
- 0x<removed> - James Boswell <removed@com>
Do you want to continue? [Y/n]: y
You need a passphrase to unlock the secret key for
user: "James Boswell <[email protected]>"
2048-bit DSA key, ID <removed>, created 2017-02-21
<pinentry-mac pop up happens outside terminal>
[master 403299c] Save secret to foo: Inserted user supplied password
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 foo.gpg
Warning: git has not remote. Ignoring auto-push option
Run: gopass git remote add origin ...
I can confirm @jamesboswell's comment, it fixed my issue. The only error now is: Failed to restore terminal: errno 0
This issue was fixed in #85 and commented on in #80.
Most helpful comment
I can confirm @jamesboswell's comment, it fixed my issue. The only error now is:
Failed to restore terminal: errno 0