I was struggling to add an unofficial repo for amd catalyst. When I tried to add the key I get a strange error. “connecting to dirmngr failed” simplest hack to solve it is to give the following command from root.
sudo -i dirmngr < /dev/null
this will create necessary stuff for gpg. after the pacman-key -r key-id will work.
Source: https://bugs.archlinux.org/task/42798