无法将pgp密钥发送到密钥服务器


10

尝试按照http://packaging.ubuntu.com/singlehtml/中的步骤为某些软件创建deb软件包...

我必须先生成一个GPG密钥

$ gpg --gen-key

然后将密钥的公开部分上传到密钥服务器

$ gpg --send-keys --keyserver keyserver.ubuntu.com 12345678
gpg: sending key 12345678 to hkp server keyserver.ubuntu.com
gpg: keyserver timed out
gpg: keyserver send failed: keyserver error

尝试添加端口80,因为我阅读了一些有关防火墙阻止这些请求的信息

gpg --send-keys --keyserver hkp://keyserver.ubuntu.com:80 C58C1F62
gpg: sending key C58C1F62 to keyserver.ubuntu.com:80
gpgkeys: no keyserver host provided
gpg: keyserver internal error
gpg: keyserver send failed: keyserver error

尝试了其他我在网络上搜索这些错误的服务器

$ gpg --send-keys --keyserver sks-keyservers.net:80 12345678
gpg: sending key 12345678 to keyserver.sks-keyservers.net:80
gpgkeys: no keyserver host provided
gpg: keyserver internal error
gpg: keyserver send failed: keyserver error

$ gpg --send-keys --keyserver  pgp.mit.edu:80 12345678
gpg: sending key 12345678 to pgp.mit.edu:80
gpgkeys: no keyserver host provided
gpg: keyserver internal error
gpg: keyserver send failed: keyserver error

也尝试过

gpg --send-keys --keyserver  keyserver.pgp.com:80 12345678
gpg --send-keys --keyserver  keyserver.sks-keyservers.net:80 12345678

(以防万一我需要“ keyserver”东西)

都具有相同的错误。

我想念什么?

更新:更改了选项顺序并添加了hkp:\协议-现在我仍然回到开始的地方-消息中有一点改进

$ gpg --keyserver hkp://pool.sks-keyservers.net --send-keys 12345678
  gpg: sending key 12345678to hkp server pool.sks-keyservers.net
  gpg: keyserver timed out
  gpg: keyserver send failed: keyserver error

编辑:我读到丢失的密钥服务器主机可能是一条错误消息,实际上意味着该密钥在服务器上不存在...但是,如果我发送它,那么它当然将不存在。

gpg --send-keys --keyserver keyserver.ubuntu.com:80 C58C1F62
gpg: sending key C58C1F62 to keyserver.ubuntu.com:80
gpgkeys: no keyserver host provided
gpg: keyserver internal error
gpg: keyserver send failed: keyserver error

dig keyserver.ubuntu.com
; <<>> DiG 9.8.1-P1 <<>> keyserver.ubuntu.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40676
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0    
;; QUESTION SECTION:
;keyserver.ubuntu.com.      IN  A    
;; ANSWER SECTION:
keyserver.ubuntu.com.   217 IN  A   91.189.90.55
keyserver.ubuntu.com.   217 IN  A   91.189.89.49    
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Sep 30 12:41:52 2014
;; MSG SIZE  rcvd: 70

这意味着服务器存在?但是问题部分看起来是空的...

gpg --send-keys --keyserver hkp://keyserver.ubuntu.com:80 C58C1F62
gpg: sending key C58C1F62 to hkp server keyserver.ubuntu.com
gpgkeys: HTTP post error 7: couldn't connect: eof
gpg: keyserver internal error
gpg: keyserver send failed: keyserver error

dig hkp://keyserver.ubuntu.com    
; <<>> DiG 9.8.1-P1 <<>> hkp://keyserver.ubuntu.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 968
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;hkp://keyserver.ubuntu.com.    IN  A    
;; AUTHORITY SECTION:
ubuntu.com.     899 IN  SOA ns1.canonical.com. hostmaster.canonical.com. 2014093001 10800 3600 604800 3600    
;; Query time: 164 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Sep 30 13:08:37 2014
;; MSG SIZE  rcvd: 105

我还尝试为代理添加选项...

gpg --keyserver-options http-proxy='http://10.1.1.1:1234/' --keyserver hkp://keyserver.ubuntu.com:80 --send-keys C58C1F62
gpg: sending key C58C1F62 to hkp server keyserver.ubuntu.com
gpgkeys: HTTP post error 7: couldn't connect: eof
gpg: keyserver internal error
gpg: keyserver send failed: keyserver error

Answers:


9

有同样的问题。更改hkpshkpgpg --keyserver hkp://hkps.pool.sks-keyservers.net --send-key。而且有效。


这将重复另一个答案,并且不会添加任何新内容。除非您确实有新的贡献,否则请不要发布答案。
DavidPostill

@DavidPostill在另一个答案中,没有明确指出应该删除一个或多个以便工作。您认为我应该删除答案吗?
auraz

此修补程序适用于使用enigmail提取密钥的问题。解决方案是在设置中编辑密钥服务器uri。Enigmail声称没有找到密钥。
lucidbrot

3

存在多个问题:

  • --keyserver选项必须在之前说明--send-keys

  • --keyserver需要包含协议的URI。Ubuntu密钥服务器的一个示例是

    --keyserver hkp://keyserver.ubuntu.com
    
  • 您为sks密钥服务器网络使用了错误的主机。阅读https://sks-keyservers.net/overview-of-pools.php了解可用的池。最通用的(其他池主要按区域划分)是pool.sks-keyservers.net,您可以将其与

    --keyserver hkp://pool.sks-keyservers.net
    

谢谢-我尝试过,但服务器仍然超时...请参阅更新
Thalia
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.