gopass icon indicating copy to clipboard operation
gopass copied to clipboard

GPG messages in output

Open weavage opened this issue 3 years ago • 4 comments

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

weavage avatar Apr 20 '21 18:04 weavage

What versions of GPG2 are you using? Anything special in your gpg.conf already?

AnomalRoil avatar Apr 20 '21 20:04 AnomalRoil

My gpg version is 2.0.22 Says it's using libgcrypt 1.5.3 /usr/bin/gpg is symlinked to /usr/bin/gpg2

weavage avatar Apr 20 '21 20:04 weavage

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.

stelgenhof avatar Nov 23 '21 00:11 stelgenhof

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?

razum2um avatar Jul 27 '22 15:07 razum2um

This is already in the docs.

dominikschulz avatar Dec 04 '22 15:12 dominikschulz