You are not logged in.
I'm not very experienced with gpg and I'm sure this is a simple problem but I cannot figure out the reason for the error.
I'm using pass. If I type pass directory/targetitem (eg: pass google/login) it replies : "gpg: Sorry, we are in batchmode - can't get input"
However if I go to ~/.password-store and type "gpg --decrypt google/login" it will ask for the master password and it works. Thereafter, for a short period of time, I can once again use "pass google/login" and it will behave as expected.
What am I missing?!
R.
Last edited by ralvez (2016-01-26 19:07:14)
Offline
The more I look into this problem the more it seems like is either:
1. pass not talking to gpg or vice-versa
2. pinentry settings
Any other ideas?
Last edited by ralvez (2016-01-26 19:00:20)
Offline
Are you running an agent? If so, how do you start it? Paste your .gnupg/*.conf files.
Offline
@jasonwryan,
Yes, I am.
But I just fixed it.
In the wiki it is suggested to edit ~/.gnupg/gpg.conf and add:
allow-loopback-pinentry
It did work in the past but all of the sudden it did not like that anymore.
I just commented that line and now it works again.
Thanks Jason!!
R.
Offline
That was for unattended passphrases and, as it notes, it may break other usage...
Offline
Yup. It used to work, but after trying many different things I read the wiki again, so and decided to take it out ...
R.
Offline
Actually I'm having the same problem...
@ralvez, what did you do exactly that solved the problem?
gpg.conf:
use-agent
require-cross-certification
gpg-agent.conf:
allow-loopback-pinentry
pinentry-program /usr/bin/pinentry-curses
no-grab
.zshrc;
GNUPGHOME=~/.gnupg
GPG_TTY=$(tty)
export GPG_TTY
Edit: Kind of a kludge but if I edit /usr/bin/pass and take out the "--batch" option it runs as intended. Maybe this is a bug upstream with pass?
Last edited by charli3 (2016-01-28 04:40:48)
Offline
You have the loopback entry in your agent.conf...
Offline
@charli3.
I had the line: "allow-loopback-pinentry" in ~/.gnupg/gpg.conf
That if you look in the wiki says that it may work but it may also cause problems.
So, I removed it and it worked.
Your case may be a different problem though, because you have the line in ~/.gnupg/gpg-agent.conf which is supposed to be OK.
Or at least that is what I get looking at the wiki.
First, edit the gpg-agent configuration to allow loopback pinentry mode:
~/.gnupg/gpg-agent.conf
allow-loopback-pinentry
R
Offline
Rather than blindly copying from the wiki, read the man pages or official documentation: https://www.gnupg.org/documentation/man … PTION.html
loopback
Use a loopback pinentry. This fakes a pinentry by using inquiries back to the caller to ask for a passphrase. This option may only be set if the agent has been configured for that.
Neither of you want that.
Offline
@jasonwryan,
But would he not want that IF he is using something like a GUI interface? Like QTpass?
R,
Last edited by ralvez (2016-01-29 00:25:30)
Offline
No, that is what --pinentry-program is for in the agent-conf
Offline
@jasonwryan,
Rather than blindly copying from the wiki, read the man pages or official documentation: https://www.gnupg.org/documentation/man … PTION.html
loopback
Use a loopback pinentry. This fakes a pinentry by using inquiries back to the caller to ask for a passphrase. This option may only be set if the agent has been configured for that.Neither of you want that.
Actually, I do want loopback pinentry. I'm using a script to handle a call to gpg from offlineimap per the wiki here: https://wiki.archlinux.org/index.php/Of … #Using_GPG
I think the "--batch" option problem in pass is unrelated to the "allow-loopback-pinentry" option in the gpg-agent.conf, though I could be wrong...
@ralvez,
Thanks for the response. I saw that too in the wiki and didn't have "allow-loopback-pinentry" in gpg.conf but it still gave the same error. The only fix that worked for me was to edit the actual /usr/bin/pass to omit the "--batch" option.
Last edited by charli3 (2016-01-29 02:52:18)
Offline
I saw that too in the wiki and didn't have "allow-loopback-pinentry" in gpg.conf but it still gave the same error. The only fix that worked for me was to edit the actual /usr/bin/pass to omit the "--batch" option.
Same here.
Offline