opengpg keys help gives incorrect protocol in instructions

Bug #710054 reported by Shuo on 2011-01-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
High
Unassigned

Bug Description

https://launchpad.net/+help/openpgp-keys.html#publish

here, in the Publishing your key > Step 3, there is "You may need to add http://keyserver.ubuntu.com:11371 to your key servers if you are not using Ubuntu", I think the protocol is to be hkp:// not http://

Related branches

Shuo (tycable) on 2011-01-30
summary: - keyserver protocol error in introducting gpg
+ keyserver protocol error in introducing gpg

Why do you think that? whats happening when you try?

Changed in launchpad:
status: New → Incomplete
Robert Collins (lifeless) wrote :

Confirmed with IS, port 11371 is hkp.

Changed in launchpad:
importance: Undecided → High
status: Incomplete → Triaged
tags: added: trivial
Shuo (tycable) wrote :

Thanks

If I set the following line in the ~/.gnupg/gpg.conf

keyserver http://keyserver.ubuntu.com

then I will receive nothing when I type "gpg --recv-keys <keyID>" in the terminal

and when I type "gpg --search-keys <keyID>"

it will tell me "this kind of server does not support this operation"

though I know I can type "gpg --recv-keys --keyserver keyserver.ubuntu.com <keyID>"

but I want to type less

If the line I set is

keyserver hkp://keyserver.ubuntu.com

then all well

Do you normally use an http proxy on your network?

Yes, I have a http proxy, however, though I turn off the proxy, the http:// protocol does not work when using command line.

And, I find that in the setting of the Application > Accessories > Passwords and Encryption Keys ( Lucid ), it is also the hkp:// protocol.

So, I think it should be hkp://

Right?

Martin Pool (mbp) wrote :

As far as I know or can tell, hkp is basically just a protocol on top of http. Whichever one you use, gpg will send the same request. I think the only difference is that a url starting with http:// defaults to port 80 whereas one with the hkp scheme defaults to port 11371.

Thus http://keyserver.ubuntu.com:11371 works exactly the same as hkp://keyserver.ubuntu.com:11371

I think if you include the port number in your configuration, or if you tell gpg to use your proxy, you should be fine.

Changed in launchpad:
status: Triaged → Invalid
Robert Collins (lifeless) wrote :

Martin, Shuo was fairly clear that changing only http->hkp made it work, and openpgp will accept hkp, and hkp is the stated protocol. Reopening.

Changed in launchpad:
status: Invalid → Triaged
summary: - keyserver protocol error in introducing gpg
+ opengpg keys help gives incorrect protocol in instructions
Martin Pool (mbp) wrote :

Shuo, my question is, what happens if you put

keyserver http://keyserver.ubuntu.com:11371/

into your configuration?

 think it will work. Changing to use hkp only makes it accidentally work because that changes the default port. However, the launchpad help already tells you to set the port.

Shuo (tycable) wrote :

Oh, sorry, I just forget to type the port here, I've type port in my configuration.

I'm so sorry. I will be more carefully from now on.

I will describe the situation in detail now:

1 ) if I put

        keyserver http://keyserver.ubuntu.com:11371/
or
        keyserver http://keyserver.ubuntu.com/
or
        keyserver http://keyserver.ubuntu.com:80/

in my configuration file, when I use the following command

        gpg --search-keys F73D6274

I will receive the following message each time

        gpg: searching for "F73D6274" from http server keyserver.ubuntu.com
        gpgkeys: this keyserver type only supports key retrieval
        gpg: keyserver internal error
        gpg: keyserver search failed: keyserver error

when I use another command

        gpg --recv-keys F73D6274

I will receive

when it comes with keyserver http://keyserver.ubuntu.com:11371/

        gpg: requesting key F73D6274 from http server keyserver.ubuntu.com
        gpgkeys: no key data found for http://keyserver.ubuntu.com:11371/
        gpg: no valid OpenPGP data found.
        gpg: Total number processed: 0

when keyserver http://keyserver.ubuntu.com/

        gpg: requesting key F73D6274 from http server keyserver.ubuntu.com
        gpgkeys: no key data found for http://keyserver.ubuntu.com/
        gpg: no valid OpenPGP data found.
        gpg: Total number processed: 0

when keyserver http://keyserver.ubuntu.com:80/

        gpg: requesting key F73D6274 from http server keyserver.ubuntu.com
        gpgkeys: no key data found for http://keyserver.ubuntu.com:80/
        gpg: no valid OpenPGP data found.
        gpg: Total number processed: 0

2 ) if I put

        keyserver hkp://keyserver.ubuntu.com:11371/

in my configuration file, when I use the following command

        gpg --search-keys F73D6274

I will receive the following message

        gpg: searching for "F73D6274" from hkp server keyserver.ubuntu.com
        gpg: key "F73D6274" not found on keyserver

however, when I use another command

        gpg --recv-keys F73D6274

I will receive

        gpg: requesting key F73D6274 from hkp server keyserver.ubuntu.com
        gpg: key F73D6274: "Shuo Li (GnuPG-1.4.11) <email address hidden>" not changed
        gpg: Total number processed: 1
        gpg: unchanged: 1

And when I command gpg --recv-keys BEEE6764 ( This is Martin's keyID )

I will receive

        gpg: requesting key BEEE6764 from hkp server keyserver.ubuntu.com
        gpg: key BEEE6764: public key "Martin Pool <email address hidden>" imported
        gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
        gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
        gpg: next trustdb check due at 2018-01-27
        gpg: Total number processed: 1
        gpg: imported: 1 (RSA: 1)

I've checked what I had written, wish it no wrong.

Martin Pool (mbp) wrote :

Shuo, can you please paste the output of

  sudo sh -c 'echo $http_proxy'

and also tell me if you have a proxy set in ~/.gnupg/gpg.conf

Martin Pool (mbp) wrote :

I think this is an instance of bug 712812

Shuo (tycable) wrote :

Martin, the command returns a blank line.

Do you mean, I should have an http_proxy?

I don't need to have a proxy to access Launchpad.

And I don't set proxy in my gpg.conf.

Martin Pool (mbp) wrote :

Shuo, you're quite right and I was confused. We do indeed need to say hkp rather than http in the instructions.

tags: added: docs help
Curtis Hovey (sinzui) on 2011-02-04
Changed in launchpad:
assignee: nobody → Curtis Hovey (sinzui)
tags: added: gpg
Curtis Hovey (sinzui) on 2011-02-04
Changed in launchpad:
status: Triaged → In Progress
Curtis Hovey (sinzui) on 2011-02-04
Changed in launchpad:
milestone: none → 11.02
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Curtis Hovey (sinzui) on 2011-02-05
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant) on 2011-02-07
Changed in launchpad:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui) on 2017-05-15
Changed in launchpad:
assignee: Curtis Hovey (sinzui) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers