Dealing with the error that HTTP fetch error occurs in gpg and the key cannot be obtained

TL;DR

--hkp port is usually 11371 --Specify an available port, such as gpg --keyserver hkp: //keyserver.ubuntu.com:80

Status

When I tried to install pritunl on centos7 on the corporate virtual host, I got the following error

$ gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys CF8E292A
gpg:Key CF8E292A from hkp to server keyserver.ubuntu.Request to com
gpgkeys: HTTP fetch error 56: Recv failure: Connection reset by peer
gpg:No valid OpenPGP data found.

The hkp port normally uses 11371. The virtual host used this time had an error because outbound 11371 was not allowed due to the security settings.

$ cat /etc/services | grep hkp
pgpkeyserver    11371/tcp       hkp             # PGP/GPG public keyserver
pgpkeyserver    11371/udp       hkp             # PGP/GPG public keyserver

If you can yum, you can use No. 80, so specify: 80.

$ gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CF8E292A
gpg:Key CF8E292A from hkp to server keyserver.ubuntu.Request to com
gpg:Key CF8E292A:Public key"Pritunl <[email protected]>"Have been imported
gpg:Total number of processes: 1
gpg:import: 1  (RSA: 1)

It worked

Recommended Posts

Dealing with the error that HTTP fetch error occurs in gpg and the key cannot be obtained
Address to the bug that node.surface cannot be obtained with python3 + mecab
Error that Qt plugin "cocoa" cannot be found in python-opencv
Examples and solutions that cannot be optimized well with scipy.optimize.least_squares
I bought and analyzed the year-end jumbo lottery with Python that can be executed in Colaboratory
Parallel computing (pathos) when dealing with objects that cannot be pickled
Dealing with key not found error in pacstrap when installing Arch Linux
Dealing with "years and months" in Python
Dictionary key error → Resolve with key in dicionary
Items that cannot be imported with sklearn
A solution to the problem that the Python version in Conda cannot be changed
About the matter that localhost: 4040 cannot be accessed after running Spark with Docker
I tried to predict the horses that will be in the top 3 with LightGBM
[Django] css in the project cannot be read
The story that fits in with pip installation
The problem that the ifconfig command cannot be used
Patterns that files generated by OpenPyXl cannot be opened in Excel and their countermeasures
Workaround for the problem that UTF-8 Japanese mail cannot be sent with Flask-Mail (Python3)
Morphological analysis and tfidf (with test code) that can be done in about 1 minute
In Python3.8 and later, the inverse mod can be calculated with the built-in function pow.
The story that sendmail that can be executed in the terminal did not work with cron