GPG Permission Denied

gpg
keyring

#1

Hello people,

I’ve ran into this strange issue with GPG: I can not receive keys nor can I use pacman-keys to refresh keys. I’m using Manjaro, kernel 4.14 fully updated.
Using:

sudo pacman-keys --refresh-keys

Output:

 gpg: refreshing 119 keys from hkps://ipv4.pool.sks-keyservers.net:80
 gpg: keyserver refresh failed: Permission denied
 ==> ERROR: A specified local key could not be updated from a keyserver.

The keyserver is changed because I’ve tried using some of the arch wiki solutions, but none solved the issue.
When I run:

 gpg2 --refresh-keys

I get:

 gpg: refreshing 2 keys from hkps://hkps.pool.sks-keyservers.net
 gpg: keyserver refresh failed: Permission denied

Running:

 dirmngr

Output:

 dirmngr[18827.0]: permanently loaded certificates: 136
 dirmngr[18827.0]:     runtime cached certificates: 0
 dirmngr[18827.0]:            trusted certificates: 136 (135,0,0,1)
 # Home: /home/user/.gnupg
 # Config: [none]
 OK Dirmngr 2.2.5 at your service

Recieving keys does not work also, get the permission denied error. I still can update, and install packages with pacman just can’t get somethings from the aur because I cannot recieve the keys.
I just noticed that this was a system wide problem now, but I think it has been on my machine from the moment I installed Manjaro (I’ve formated this machine recently).

This are some things that I’ve tried too:

  • Updating the keyring, both archlinux and manjaro, them populating with package-keys. These steps go fine, but pacman-key --refresh keys still gives me the output above.
  • Changing key servers and their ports.
  • Pacman -Sc and trying again, no avail.

Thanks in advance for any help.

Disclaimer: I’ve posted this on reddit too (/r/linuxquestions), just some time ago.


#2

Have a look at the “nuclear option” here:


#3

Firstly, thanks for the response.

But anyways, even nuking gnupg did not work. I get the same error as before after running --refresh-keys:

gpg: refreshing 116 keys from hkp://pool.sks-keyservers.net
gpg: keyserver refresh failed: Permission denied
==> ERROR: A specified local key could not be updated from a keyserver.

Looking at the other commands I see no errors, just in this final step. Get the same while trying to receive individual keys:

gpg  --recv-key 0FC3042E345AD05D

Outputs:

gpg: keyserver receive filed: Permission denied

#4

Looking closer,

this won’t work as you’re trying to use HKPS on port 80; IIRC it needs to connect to port 443 (like HTTPS).

However, given

this may mean you simply can’t connect to the keyserver. You might try another keyserver, e.g. pgp.mit.edu.


#5

Ok this is an advancement at least. But still could not resolve the issue. To check that I had connection, I pinged khps.pool.sks-keyservers.net and got a connection. I can’t connect to pgp.mit.edu however. Ping returns nothing, lots of packages transmitted but none received.


closed #6

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.