Unverified commits in GitLab when using gpg with subkeys

Viewed 506

I have been testing GitLab and GnuPG to add my signatures to commits. I believed I followed the manual on how to setup both GitLab with a public key and a repository at home to sign commits with private key. The only difference is I use a separate subkey for signatures and encryptions. GitLab correctly recognises all public subkeys and displays certificates as verified. At home, I have assigned the correct ID of a signing subkey to user.signingkey as well as trying explicit option -S<subkey-id>

Unfortunately, each time I push signed commits, they still appear "Unverified". I checked the ID of a signing key at each commit and the subkey-ID seems correct and email addresses also match, in both GitLab and GPG certificates. The email address used in GitLab is verified. I tried user.name for GitLab credentials but it did not help, either. I was wondering what else can be unrecognised by GitLab.

I find little information regarding this issue. Usually, others follow a procedure on website creating default GPG certificates without additional subkeys and Unverified commits most likely appeared due to mismatch between email addresses. I also read this answer, which explaines how to merge subkeys into one key. However, GitLab should work with subkeys without any extra preparation. There another answer did not help me, either.

1 Answers

I had that issue, after I imported my GPG keys from a second PC, so the imported keys were NOT trusted on my second system.

Run gpg --list-keys and check if your line with the email hast the [ultimate] state.

If not, then set the trust with --edit-key

gpg --edit-key name@domain.tld
trust
5
yes
save
Related