Troubleshooting GitLab key uploads

When a key upload fails, the key shows Failed on the Environment's Instances tab. Point to the status to see the error. The error starts with a code, followed by details. Find the code in the following table, fix the cause, and then Repush failed keys. Failed uploads aren't retried automatically.

If GitLab is temporarily unavailable or limits the number of requests, the key stays Pending, and the upload is retried automatically.

Error

Cause

What to do

MissingEmail

The key has no email address, so the user's GitLab account can't be found.

Make sure the E-mail setting of the Environment Template resolves to an email address for the user, for example with the $IdentityEmail[$Sign.User$]$ macro, and that the user's identity has an email address.

UserNotFound

No GitLab account has the key's email address.

Add the email address to the user's GitLab account, or correct the E-mail setting of the Environment Template.

Unknown: multiple GitLab users match

More than one GitLab account has the key's email address.

Make sure only one GitLab account uses the email address.

DriverLoadFailed

Trust Protection Foundation couldn't connect to GitLab with the Git Signing Connector. The details end with the reason, such as Service is not reachable, Token is unauthorized, or User is not an admin. This error also occurs if GitLab was temporarily unavailable when the upload started.

Fix the cause described in If the connector can't be saved. For an expired or revoked token, see Rotate the token.

AuthorizationDenied

The token is valid, but it doesn't have permission to upload GPG keys or search for users.

Check the token's permissions. See Create the personal access token.

AuthenticationFailed

GitLab rejected the token.

Rotate the token.

InvalidKey

GitLab rejected the public key.

Contact Support, and include the error details and the key's event log entries.

Any other error

An unexpected error occurred.

Repush the key. If it fails again, contact Support, and include the error details and the key's event log entries.

Other issues

A key stays Pending

Keys that existed before the connector was assigned to the template are uploaded when the key is renewed or the Trust Protection Foundation service restarts. Otherwise, GitLab might be unavailable, and the upload is being retried. Check the event log for Code Signing events.

A key shows Uploaded, but commits aren't verified in GitLab

GitLab verifies a commit only if its committer email matches an email address that is on the key and verified in the user's GitLab account. Make sure the user's git user.email setting uses that address. See Signing git commits with GPG.

Upload details in the event log

Upload activity is logged as Code Signing events whose names start with Code Sign Git Signing. For a failed upload, open the Push Failed Terminal event for the key. See Viewing log events.