Bug 1362572

Summary: gpg2: agent_genkey failed: No such file or directory
Product: [Fedora] Fedora Reporter: David Kaferad // Dee'Kej <deekej>
Component: gnupg2Assignee: Tomas Mraz <tmraz>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 24CC: bcl, deekej, jamielinux, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-02 15:38:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Kaferad // Dee'Kej 2016-08-02 14:26:13 UTC
Description of problem:
I'm unable to generate new GPG key.

Version-Release number of selected component (if applicable):
gnupg2-2.1.13-1.fc24.x86_64

How reproducible:
Always

Steps to Reproduce:
1. gpg2 --full-gen-key
2. Select RSA
3. Select 4096 bit strength
4. Write your name, e-mail address, fill out comment
5. Confirm

Actual results:
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
> gpg: agent_genkey failed: No such file or directory
> Key generation failed: No such file or directory

Expected results:
The will be generated properly.

Additional info:
Similar bug has been opened for Alpine Linux:
https://bugs.alpinelinux.org/issues/5594

Comment 1 Tomas Mraz 2016-08-02 15:23:04 UTC
I suppose you're running some agent that is not the gpg-agent but something that tries to be compatible but fully isn't?
ps axu | grep gpg-agent prints something?

Comment 2 David Kaferad // Dee'Kej 2016-08-02 15:38:26 UTC
(In reply to Tomas Mraz from comment #1)
> I suppose you're running some agent that is not the gpg-agent but something
> that tries to be compatible but fully isn't?
> ps axu | grep gpg-agent prints something?

Ah, I completely forgot there was an agent running. I have previously removed .gnupg/ folder to start from scratch, but the agent was still using it.

Restarting the agent did the trick. I was able to generate new GPG key...

Thanks for the help!