Description of problem: I can't create GPG key with the command "gpg2 --gen-key" The message is : no pinentry. However pinentry & pinentry-qt4 are installed Version-Release number of selected component (if applicable): pinentry-0.9.7-1.mga6 How reproducible: Every time I attempt to create GPG key Steps to Reproduce: 1.gpg2 --gen-key 2.pb with agent : no pinentry 3.
Can you try adding this to your ~.bashrc GPG_TTY=$(tty) export GPG_TTY Then manually issue the 2 commands or log-out log-in to your WM. Are you now able to generate the gpg2 key?
CC: (none) => cae
Assigning to all packagers collectively, since there is no registered maintainer for this package.
Keywords: (none) => NEEDINFOCC: (none) => cooker, eatdirt, fundawang, luigiwalser, marja11, olavAssignee: bugsquad => pkg-bugs
Works for me with no GPG_TTY environment variable set. gpg2 --gen-key gpg (GnuPG) 2.0.30; Copyright (C) 2015 Free Software Foundation, Inc. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Please select what kind of key you want: (1) RSA and RSA (default) (2) DSA and Elgamal (3) DSA (sign only) (4) RSA (sign only) Your selection?
(In reply to Charles Edwards from comment #1) > Can you try adding this to your ~.bashrc > > GPG_TTY=$(tty) > export GPG_TTY > > Then manually issue the 2 commands or log-out log-in to your WM. > > Are you now able to generate the gpg2 key? I get the them result. I tried gnugpg 1.4, it work well.
(In reply to Chris Denice from comment #3) > Works for me with no GPG_TTY environment variable set. > > gpg2 --gen-key > gpg (GnuPG) 2.0.30; Copyright (C) 2015 Free Software Foundation, Inc. > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > > Please select what kind of key you want: > (1) RSA and RSA (default) > (2) DSA and Elgamal > (3) DSA (sign only) > (4) RSA (sign only) > Your selection? 1
Ok, thanks, confirmed!
Ok, a fix is to specify manually a pinentry-program that also works from a terminal. If I add "--pinentry-program /usr/bin/pinentry-curses" in /etc/sysconfig/gnupg2 it works fine. I am not sure this will not break gnupg2 with GUI though?
Ok, I have pushed a new pinentry-0.9.7-2 with some compilation flags switched on for allowing fallback to ncurses (and adding pinentry-tty). This fixes the pb for me, please check. Don't forget to restart the agent (or reboot) after the update: systemctl --user restart gpg-agent.service Cheers.
(In reply to Chris Denice from comment #8) > Ok, I have pushed a new pinentry-0.9.7-2 with some compilation flags > switched on for allowing fallback to ncurses (and adding pinentry-tty). > This fixes the pb for me, please check. > > Don't forget to restart the agent (or reboot) after the update: > systemctl --user restart gpg-agent.service > > Cheers. Good it works well ;-)
Perfect, closing then!
Status: NEW => RESOLVEDResolution: (none) => FIXED
Some update. To fix https://bugs.mageia.org/show_bug.cgi?id=19391, I have disabled the --keep-display option in gpg2 2.0.30-4.mga6 Which means, if you gpg2 --gen-key in a terminal within X environment, a windows to enter you pin should appear. If you do gpg2 --gen-key under a tty, obviously no window can appear, but you should still be able to enter your pin on the command line. Please reopen this bug if this fails. Cheers.