Cannot add GPG signing sub-key #6529

Closed
opened 2025-11-02 06:58:37 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @etanot on GitHub (Dec 16, 2020).

Type:

Bug report

Description

When I'm trying to add my GPG signing sub-key, Gitea shows me this error message:

This GPG key is not usable with any email address associated with your account.

Basically, I run gpg --armor --export <signing-sub-key-id>! (notice, I've added a ! at end of ID, to tell GPG to only export my master key and specific sub-key information, see this gnupg-users mailing list thread). I've no issue with adding my sub-key this way to Github and Gitlab.

Steps to Reproduce

  • Run gpg --armor --export <signing-sub-key-id>! command.
  • Copy the output of the command (public key).
  • Go Settings -> SSH/GPG keys -> Manage GPG keys.
  • Click on Add key button in Manage GPG keys section.
  • Paste the copied public key.
  • Now, click on green Add key button.

Expected Output

Key should be added successfully.

Actual Output

Getting this error message, This GPG key is not usable with any email address associated with your account.

Originally created by @etanot on GitHub (Dec 16, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.14.0+dev-389-g88b585c2e (https://try.gitea.io) - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (https://try.gitea.io/user/settings/keys) - [ ] No ##### Type: Bug report ## Description When I'm trying to add my GPG signing sub-key, Gitea shows me this error message: `This GPG key is not usable with any email address associated with your account.` Basically, I run `gpg --armor --export <signing-sub-key-id>!` (notice, I've added a `!` at end of ID, to tell GPG to only export my master key and specific sub-key information, see [this gnupg-users](https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057400.html) mailing list thread). I've no issue with adding my sub-key this way to Github and Gitlab. ### Steps to Reproduce - Run `gpg --armor --export <signing-sub-key-id>!` command. - Copy the output of the command (public key). - Go `Settings -> SSH/GPG keys -> Manage GPG keys`. - Click on `Add key` button in `Manage GPG keys` section. - Paste the copied public key. - Now, click on green `Add key` button. ### Expected Output Key should be added successfully. ### Actual Output Getting this error message, `This GPG key is not usable with any email address associated with your account.`
Author
Owner

@a1012112796 commented on GitHub (Dec 16, 2020):

@finn0 hello, Now gitea only allow add public gpg keys bounded with the user's email.

@a1012112796 commented on GitHub (Dec 16, 2020): @finn0 hello, Now gitea only allow add public gpg keys bounded with the user's email.
Author
Owner

@etanot commented on GitHub (Dec 17, 2020):

Thanks @a1012112796, then closing this bug report and opening another issue for the feature request.

@etanot commented on GitHub (Dec 17, 2020): Thanks @a1012112796, then closing this bug report and opening another issue for the feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6529