Skip to content

Instantly share code, notes, and snippets.

@thewh1teagle
Last active May 12, 2024 22:16
Show Gist options
  • Save thewh1teagle/f1196cd85f71bd85b1674eb77c5d016a to your computer and use it in GitHub Desktop.
Save thewh1teagle/f1196cd85f71bd85b1674eb77c5d016a to your computer and use it in GitHub Desktop.
Git commit signing on Windows

Commit signing on Windows

  1. Open notepad.exe
  2. Open github.com/settings/emails
  3. Copy your Github email to notepad (ends with @users.noreply.github.com)
  4. Open cmd.exe
  5. Create new ssh key
ssh-keygen -t ed25519 -C "{email}"

You can press enter in the prompts.

  1. Open both public and private key files in text editor and then paste them to notepad.exe

  2. Backup private and public key and the used email in the following format:

{Day/Month/Year}
{email}

{private key}

{public key}
  1. Open github.com/settings/ssh/new
  2. Set title to {Day/Month/Year}, value to public key value, key type to signingKey
  3. Configure git
git config --global user.name "{username}"
git config --global user.email "{email}"
git config --global user.signingkey "C:\Users\{username}\.ssh\{key_name}.pub"
git config --global commit.gpgsign true
git config --global gpg.format ssh

That's it 👍🏼😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment