Skip to content

Adding a GPG key does not recognize all idents

Summary

Adding a GPG key does not recognize the idents asociated with the key.

Gitlab reads the key and does not produce any error message on production.log. On interface, key was added, and I can read my key fingerprint and the additional sub-keys fingerprint (The key have tree subkeys).

Problem are with email addresses. Only one email address are displayed on gitlab interface (and there isn't the mail email address).

I don't know the conditions to produce the bug. Ive checked it on gitlab.com webpage, on a debian installation from packages.gitlab.com package (version 11.5.1) and on a debian packaged non-omnibus installation (version 11.3.10, but tested also on 11.1.8 and 11.2.8).

I've tested with another key and there's added without problem.

I can do some tests for verify this bug, if it's required. My public GPG key are uploaded on public servers and added on gitlab.com if it's required for testing.

I remember, I've added the same key on a gitlab 10.x debian packaged non-omnibus installation, and then, I haven't detected this behavior. But, I cannot remember if I've changed something on the key after this. Also, I doesn't have any 10.x version for testing it now.

For more information, there's a bug opened on debian bugtracker. The issue address are: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914159

What is the current bug behavior?

Adding GPG key to profile, on some cases, does not recognize / does not show all email address asociated with it.

What is the expected correct behavior?

Adding GPG key should recognize all email address.

Relevant logs and/or screenshots

On logs there's not any interesting information. When adding GPG key, there's not errors on production.log

There's the log of a 11.3.10 non-omnibus debian gitlab installation:

Started POST "/profile/gpg_keys" for x.x.x.x at 2018-11-29 01:49:45 +0100
Processing by Profiles::GpgKeysController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "gpg_key"=>"[FILTERED]"}
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: cd2c753e-e68c-4cfc-9e73-90ce308864dd) to Sidekiq(mailers) with arguments: "Notify", "new_gpg_key_email", "deliver_now", 12
[ActiveJob] [ActionMailer::DeliveryJob] [cd2c753e-e68c-4cfc-9e73-90ce308864dd] Performing ActionMailer::DeliveryJob from Sidekiq(mailers) with arguments: "Notify", "new_gpg_key_email", "deliver_now", 12
Redirected to https://git.example.com/profile/gpg_keys
Completed 302 Found in 744ms (ActiveRecord: 19.3ms)
Started GET "/profile/gpg_keys" for x.x.x.x at 2018-11-29 01:49:46 +0100

Output of checks

This bug also appears on gitlab.com

Edited by Er_Maqui