Bug 285081 - Kgpg can't create key pairs
Summary: Kgpg can't create key pairs
Status: RESOLVED FIXED
Alias: None
Product: kgpg
Classification: Applications
Component: general (show other bugs)
Version: 2.6.x
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Rolf Eike Beer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-27 10:44 UTC by Carlos Cámara
Modified: 2017-12-23 03:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.3


Attachments
Screenshot displaying warning message (35.66 KB, image/png)
2011-10-27 21:25 UTC, Carlos Cámara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Cámara 2011-10-27 10:44:47 UTC
Version:           unspecified (using KDE 4.7.2) 
OS:                Linux

Whenever I try to create the pair of keys and I type passfrase I get a message saying that the keys were not created although my system tray says the contrary. The fact is that keys are not created at all.


Reproducible: Always

Steps to Reproduce:
create new pair keys (Ctrl+N)
fill all data
Type passphrase

Actual Results:  
Notification message: "GPG process didn't finish. It's not possible to generate a new pair of keys" (message in English may differ a little)

Expected Results:  
Creation of a pair keys
Comment 1 Rolf Eike Beer 2011-10-27 12:02:39 UTC
The message box should have a "Details" button that should tell you the
reason for GnuPG failing.
Comment 3 Carlos Cámara 2011-10-27 21:25:47 UTC
Created attachment 64953 [details]
Screenshot displaying warning message

No details button available
Comment 4 Carlos Cámara 2011-10-27 21:40:47 UTC
I wrote while you where writing. I see you have solved it. I'll wait to see if new version is added to kubuntu repositories soon.
Comment 5 Rolf Eike Beer 2011-10-28 07:56:48 UTC
Can you please switch the language to English (in the Help menu) and tell
me the exact error message of KGpg? No screenshot needed, just the text it
displays.
Comment 6 Carlos Cámara 2011-10-28 09:41:31 UTC
Sure!

Text:
"gpg process did not finish. Cannot generate a new key pair"
Comment 7 Rolf Eike Beer 2011-10-28 11:53:49 UTC
Please open a konsole and run:

LANG=C GNUPGHOME=/home/user/.gnupg gpg --status-fd=1 --command-fd=0
--no-verbose --no-greeting --gen-key --batch

This is the same as KGpg does. This should fail and hopefully print out an
error message that gives you a clue what is wrong.
Comment 8 Carlos Cámara 2011-10-28 12:18:17 UTC
This is what it returns:

gpg: fatal: can't create directory `/home/user/.gnupg': No such file or directory
secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768

Hope this helps.
Comment 9 Rolf Eike Beer 2011-10-28 12:39:10 UTC
> gpg: fatal: can't create directory `/home/user/.gnupg': No such file or
> directory
> secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768

Sure:

mkdir /home/user/.gnupg
chmod 700 /home/user/.gnupg

Afterwards KGpg should work fine.
Comment 10 Rolf Eike Beer 2011-10-28 17:42:31 UTC
Git commit 61c3af0d764b7c7a56d2207ed953c7e5e865738b by Rolf Eike Beer.
Committed on 28/10/2011 at 19:37.
Pushed by dakon into branch 'KDE/4.7'.

if key generation failed tell the user what GnuPG complained about

This should give a hint about broken config files, missing directories and such.

CCBUG:285081

M  +1    -1    keysmanager.cpp
M  +22   -2    transactions/kgpggeneratekey.cpp
M  +9    -0    transactions/kgpggeneratekey.h

http://commits.kde.org/kgpg/61c3af0d764b7c7a56d2207ed953c7e5e865738b