FS#63711 - [gnupg] cannot import or generate private key

Attached to Project: Arch Linux
Opened by Oskar Roesler (bionade24) - Tuesday, 10 September 2019, 09:23 GMT
Last edited by Gaetan Bisson (vesath) - Tuesday, 02 June 2020, 20:51 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Can't import my private key with root user nor generate a new key.
Tested on 2 devices.
Additional info:
* package version(s)
gpg (GnuPG) 2.2.17
libgcrypt 1.8.5

* config and/or log files etc.
Genkey:
gpg: agent_genkey failed: Keine Berechtigung
Schlüsselerzeugung fehlgeschlagen: Keine Berechtigung
Import:
gpg: Schlüssel 32443EEC89C5C615/32443EEC89C5C615: Fehler beim Senden zum gpg-agent: Keine Berechtigung
gpg: error building skey array: Keine Berechtigung
gpg: Fehler beim Lesen von `priv.key': Keine Berechtigung
gpg: import from 'priv.key' failed: Keine Berechtigung
* link to upstream bug report, if any
Steps to reproduce:
Log in as root.
gpg --gen-key or gpg --import priv.key
This task depends upon

Closed by  Gaetan Bisson (vesath)
Tuesday, 02 June 2020, 20:51 GMT
Reason for closing:  Upstream
Comment by Eli Schwartz (eschwartz) - Tuesday, 10 September 2019, 13:09 GMT
  • Field changed: Summary ([gnupg] PLEASE ENTER SUMMARY → [gnupg] cannot import or generate private key)
Please show the output you get when using

LC_ALL=en_US.UTF-8 gpg priv.key

Since you should be using English in your output paste for the same reason you used English for your description...
Comment by Oskar Roesler (bionade24) - Tuesday, 10 September 2019, 13:12 GMT
gpg: key A4A0D73114FDE6FC/A4A0D73114FDE6FC: error sending to agent: Permission denied
gpg: error building skey array: Permission denied
gpg: error reading 'priv.key': Permission denied
gpg: import from 'priv.key' failed: Permission denied
Comment by Gaetan Bisson (vesath) - Wednesday, 11 September 2019, 00:07 GMT
I have no idea why you'd like to run gpg as root but the problem seems to be due to pinentry. The last system calls before the error are:

write(5, "GENKEY", 6) = 6
write(5, "\n", 1) = 1
read(5, "S INQUIRE_MAXLEN 1024\nINQUIRE KE"..., 1002) = 39
write(5, "D (genkey(rsa(nbits 4:2048)))\n", 30) = 30
write(5, "END", 3) = 3
write(5, "\n", 1) = 1
read(5, "INQUIRE PINENTRY_LAUNCHED 16959 "..., 1002) = 65
write(5, "END", 3) = 3
write(5, "\n", 1) = 1
read(5, "ERR 83918849 Permission denied <"..., 1002) = 42

I do not believe this is a packaging issue. Could you please report this upstream?
Comment by Oskar Roesler (bionade24) - Sunday, 29 September 2019, 18:22 GMT
Upstream bugtracker: https://dev.gnupg.org/T4714
Comment by Gaetan Bisson (vesath) - Tuesday, 02 June 2020, 20:51 GMT
Upstream decided to close this issue on their tracker. I do not believe there is much we can do packaging-wise but please feel free to request a reopen if you disagree and can provide a working patch to our PKGBUILD. Cheers.

Loading...