You are not logged in.
So up until yesterday gpg was working all fine. But today, it doesn't prompt for passphrase, I just get an empty blinking command line.
I'm using gpg for signing git commits. I thought the problem was with git. But no, if I do echo "test" | gpg --clearsign I get the same than when doing git commit (empty command line not prompting for passphrase).
At first, the error I was getting when doing git commit was
error: gpg failed to sign the data
fatal: failed to write commit objectBut in this thread they said to export GPG_TTY=$(tty) in your bashrc/zshrc
if you get that error. That stopped gpg from showing the error error: gpg failed to sign the data but it still doesn't prompt for passphrase.
I can't do anything related to prompting for passphrase, not listing my keys with gpg --list-secret-keys --keyid-format LONG or anything. I can see my public with no problem. I tried importing my private key again and I get:
gpg: key <KEYID>: "<NAME EMAIL" not changedAnd then just a empty command line again.
I have pinentry installed just in case anyone asks.
I don't understand. It was all working fine yesterday! Does anyone knows how to solve this ?
Last edited by madrafa (2021-04-02 23:08:51)
Offline
Are you using a gpg agent? How is it configured?
Offline
Are you using a gpg agent? How is it configured?
Yes. I think it is pulled as a dependency for gpg. I don't know how it is configured.
--options file
Reads configuration from file instead of from the default per-user configuration
file. The default configuration file is named ‘gpg-agent.conf’ and expected in
the ‘.gnupg’ directory directly below the home directory of the user. This op‐
tion is ignored if used in an options file.I found this in the man page, but I don't have such file in ~/.gnupg , What do I have to put in that file ? Also, I've checked and gpg-agent is running. And to make sure I manually started the program and then tried echo "test" | gpg --clearsign but still... I don't get anything.
Offline
There you configure the pinentry program that you want to use. For example:
pinentry-program /usr/bin/pinentrySee https://wiki.archlinux.org/index.php/GnuPG#gpg-agent for other options.
What happens when you run `pinentry` in a terminal?
Offline
This is what happens, Just a little message and then an empty prompt.
Last edited by madrafa (2021-04-02 16:22:37)
Offline
So, I've testing the pinentry-program /usr/bin/pinentry option you told me, using different pinentry programs like pinentry-tty or pinentry-qt but none of them seem to solve my issue ![]()
Offline
What is the output of
journalctl --user -b -u gpg-agentListing secret keys should not depend on pinentry. What is the result of
gpg --list-secret-keysOffline
I restarted my computer and it is working again. No idea what was wrong.
Doing:
journalctl --user -b -u gpg-agentdidn't show any error, just some output of fd 3 for browser socket bla bla bla and it was like 8 lines of that.
Offline
I got this error yesterday on KDE/Plasma. Normally I get a popup to sign commits, or if I'm remote, I'll get the curses password prompt on the command line. Turns out pinentry-gtk-2 was locked up somehow. I did
killall pinentry-gtk-2then it started working again.
Offline