0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

gpgでHTTP fetch errorが出て鍵が取得できないエラーの対処

Posted at

TL;DR

  • hkpのポートは通常11371
  • gpg --keyserver hkp://keyserver.ubuntu.com:80 のように利用出来るポートを指定するといい

状況

社内仮想ホスト上のcentos7にpritunlをインストールしようとした際、下記のようなエラーが出ました

$ gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys CF8E292A
gpg: 鍵CF8E292Aをhkpからサーバkeyserver.ubuntu.comに要求
gpgkeys: HTTP fetch error 56: Recv failure: Connection reset by peer
gpg: 有効なOpenPGPデータが見つかりません。

hkpのポートは通常11371を利用します。今回利用した仮想ホストはセキュリティ設定によりアウトバウンドの11371が許可されていなかった為エラーになっていました。

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

yum出来る環境であれば80番等使えると思うので、:80を指定。

$ gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CF8E292A
gpg: 鍵CF8E292Aをhkpからサーバkeyserver.ubuntu.comに要求
gpg: 鍵CF8E292A: 公開鍵"Pritunl <contact@pritunl.com>"をインポートしました
gpg:         処理数の合計: 1
gpg:           インポート: 1  (RSA: 1)

上手くいきました

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?