Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined signature #1

Open
ahmed82 opened this issue Jun 9, 2022 · 1 comment
Open

Undefined signature #1

ahmed82 opened this issue Jun 9, 2022 · 1 comment

Comments

@ahmed82
Copy link
Member

ahmed82 commented Jun 9, 2022

Undefined signature showing next to the commit section.

@ahmed82
Copy link
Member Author

ahmed82 commented Jun 9, 2022

First run this command via the command line to see which keys already exist:

gpg --list-secret-keys --keyid-format=long

Make sure the email that is being used in your key on GitHub is the correct email in git by running this command:

git config --list

The output of user name, email and key should match what is in your GPG key on GitHub:

user.name=Margeaux Spring
user.email=youremailhere
user.signingkey=yourgpgkey

If there is an email mismatch, your signed commits are still being tagged as “unverified” on GitHub, and you will need to add the correct email found via the step above with this command:

git config --global user.email [email protected]

You cannot assume that git will use the same email for storing and signing the commit.

You can also add more than one email to a key like this:

  1. gpg --list-secret-keys --keyid-format=long
  2. gpg --edit-key YOURKEYTOEDITHERE
  3. a gpg prompt should appear, then you type adduid and press enter
  4. add the email you need to when prompted
  5. after you have followed all the prompts, enter save at the gpg prompt
  6. now enter gpg --armor --export YOUREDITEDKEY
  7. copy and paste the entire block that appears in your terminal, from and including:
    -----BEGIN PGP PUBLIC KEY BLOCK----- to -----END PGP PUBLIC KEY BLOCK-----
    Next, go to GitHub and click on Settings->SSH & GPG Keys, delete the old key, click the green New GPG Key button, paste in the key you have copied from your terminal output previously and click save.

Your commits should now be automagically verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant