gopass
gopass copied to clipboard
GPG messages in output
Summary
When running gopass commands, there is extra output coming from GPG. I managed to stumble across a fix from this old issue: #23 I'm getting the exact same passphrase message as the above issue and adding no-tty to my gpg.conf resolves it. My question is whether or not this needs to be standard documentation? Should this setting be applied to all installations? I also managed to find a very brief sentence about it in the FAQ, but it's almost like an afterthought related to a different issue.
Steps To Reproduce
Run a command such as gopass show --password <path>
Expected behavior
Only the password will be shown
Environment
- OS: CentOS 7
- OS version: 7
- gopass Version: 1.12.x
- Installation method: releases from gopass repo
Additional context
What versions of GPG2 are you using? Anything special in your gpg.conf
already?
My gpg version is 2.0.22 Says it's using libgcrypt 1.5.3 /usr/bin/gpg is symlinked to /usr/bin/gpg2
I have the same (or similar) issue when using gopass show --password <path>
will show me the password however with the extra line saying:
gpg: selecting card failed: No such device
*******
My gpg: gpg (GnuPG) 2.2.32 gopass: 1.13.0 (2021-11-14 15:37:54) go1.17.3 linux amd64 OS: Arch Linux
I can perfectly use gpg independently signing or encrypting files, listing keys, etc and don't get that above message.
Extra checks/tests:
- Making sure it isn't related to my gopass store, tried with a fresh store and still have that extra gpg message.
- Tried with the
pass
app, and also get that messsage. - Created a fresh
.gnupgp
configuration, however same message appeared.
Thanks to this issue and https://github.com/gopasspw/gopass/issues/23 I removed "You need a passphrase to unlock the secret key for" from the output, because otherwise it breaks with pipelining even in gopass -f -o
more even if you try to redirect stderr
I think it's worth mentioning people who are using console-only gopass to do echo 'no-tty' >> ~/.gnupg/gpg.conf
in readme?
This is already in the docs.