Unable to add GPG key with extra emails #902

Closed
opened 2025-11-02 03:40:51 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @samuelallan72 on GitHub (Jul 21, 2017).

  • Gitea version (or commit ref): dde0052 (via docker image)
  • Git version: 2.13.3
  • Operating system: Archlinux
  • Database (use [x]):
    • PostgreSQL
    • MySQL (mariadb)
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: (couldn't see anything interesting in the log)

Description

I have a self hosted copy of gitea running, and can't add my gpg key to it - I get the following error (emails redacted):

The email attached to the GPG key couldn't be found or is not confirmed yet: email2@example.com

My gpg key lists multiple email addresses (eg. email1@example.com and email2@example.com), and only my primary email address is registered with my gitea account (email1@example.com).

I would expect the behaviour should be that it can add the key no worries, since the primary email address in my account is included in that gpg key.

Originally created by @samuelallan72 on GitHub (Jul 21, 2017). - Gitea version (or commit ref): dde0052 (via docker image) - Git version: 2.13.3 - Operating system: Archlinux - Database (use `[x]`): - [ ] PostgreSQL - [X] MySQL (mariadb) - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [X] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: (couldn't see anything interesting in the log) ## Description I have a self hosted copy of gitea running, and can't add my gpg key to it - I get the following error (emails redacted): `The email attached to the GPG key couldn't be found or is not confirmed yet: email2@example.com` My gpg key lists multiple email addresses (eg. email1@example.com and email2@example.com), and only my primary email address is registered with my gitea account (email1@example.com). I would expect the behaviour should be that it can add the key no worries, since the primary email address in my account is included in that gpg key.
GiteaMirror added the type/bug label 2025-11-02 03:40:51 -06:00
Author
Owner

@lunny commented on GitHub (Jul 21, 2017):

Add your other email addresses on profile settings?

@lunny commented on GitHub (Jul 21, 2017): Add your other email addresses on profile settings?
Author
Owner

@samuelallan72 commented on GitHub (Jul 21, 2017):

@lunny I guess, but I was hoping I wouldn't have to do that... :\

@samuelallan72 commented on GitHub (Jul 21, 2017): @lunny I guess, but I was hoping I wouldn't have to do that... :\
Author
Owner

@lafriks commented on GitHub (Jul 21, 2017):

From security point of view all email addresses need to be verified to be able to add GPG key with multiple email addresses as otherwise one could create GPG with his own and other users email address and sign commits in his name and they will be shown as verified.

@lafriks commented on GitHub (Jul 21, 2017): From security point of view all email addresses need to be verified to be able to add GPG key with multiple email addresses as otherwise one could create GPG with his own and other users email address and sign commits in his name and they will be shown as verified.
Author
Owner

@samuelallan72 commented on GitHub (Jul 21, 2017):

@lafriks why does Github allow that though? Maybe Gitea should at least allow adding the GPG key, but only display verified if the commit email address is both on the key and verified with your gitea account?

@samuelallan72 commented on GitHub (Jul 21, 2017): @lafriks why does Github allow that though? Maybe Gitea should at least allow adding the GPG key, but only display verified if the commit email address is both on the key and verified with your gitea account?
Author
Owner

@sapk commented on GitHub (Aug 5, 2017):

I will have a look at it and do improvement on GPG part this week-end.

@sapk commented on GitHub (Aug 5, 2017): I will have a look at it and do improvement on GPG part this week-end.
Author
Owner

@lunny commented on GitHub (Sep 5, 2017):

fixed by #2266

@lunny commented on GitHub (Sep 5, 2017): fixed by #2266
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#902