I'm having some trouble setting up GPG commit signing with github after performing a windows reinstall.
Issue:
When commiting, GPG signing fails returning this error:
gpg: skipped "993E2EFC8503C42F": No secret key gpg: signing failed: No secret key error: gpg failed to sign the data fatal: failed to write commit object Everything I have googled about this issue all point to setting gpg.program to the location of the GnuPG gpg executable ("C:\Program Files (x86)\GnuPG\bin\gpg.exe") Which sadly, has not solved my issue.
Performing gpg --list-secret-keys --keyid-format=long in git bash returns my gpg keys, however performing the same command in powershell or cmd, does not, which i believe might be my issue, although i dont know how to go about fixing this.
Steps already taken:
- installed GPG4Win from here
- installed git from here
- followed the GPG setup guide by github
- set
git config --global user.name "name..."andgit config --global user.email "email" - set
git config --global user.signingkeyto my gpg key - set
git config --global gpg.programto"C:\Program Files (x86)\GnuPG\bin\gpg.exe"as described by various other online tutorials and answers - set
git config --global commit.gpgsignto true
- already looked at "No secret key" error when signing git commit on Windows, gpg: skipped "N": secret key not available and git commit signing failed: secret key not available
Expected result:
Successfully submit a verified commit
bonus info
- Git version: 2.36.0.windows.1
- OS: windows 11 22000.613