title: Issues with signing git commits with GPG
body: <p>I'm having some trouble setting up GPG commit signing with github after performing a windows reinstall.</p>
  <h1>Issue:</h1>
  <p>When commiting, GPG signing fails returning this error:</p>
  <pre><code>gpg: skipped &quot;993E2EFC8503C42F&quot;: No secret key
  gpg: signing failed: No secret key
  error: gpg failed to sign the data
  fatal: failed to write commit object
  </code></pre>
  <p>Everything I have googled about this issue all point to setting <code>gpg.program</code> to the location of the GnuPG gpg executable (<code>&quot;C:\Program Files (x86)\GnuPG\bin\gpg.exe&quot;</code>) Which sadly, has not solved my issue.</p>
  <p>Performing <code>gpg --list-secret-keys --keyid-format=long</code> 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.</p>
  <h1>Steps already taken:</h1>
  <ol>
  <li>installed GPG4Win from <a href="https://gpg4win.org/get-gpg4win.html" rel="nofollow noreferrer">here</a></li>
  <li>installed git from <a href="https://git-scm.com/downloads" rel="nofollow noreferrer">here</a></li>
  <li>followed the GPG setup guide by <a href="https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key" rel="nofollow noreferrer">github</a></li>
  <li>set <code>git config --global user.name &quot;name...&quot;</code> and <code>git config --global user.email &quot;email&quot;</code></li>
  <li>set <code>git config --global user.signingkey</code> to my gpg key</li>
  <li>set <code>git config --global gpg.program</code> to <code>&quot;C:\Program Files (x86)\GnuPG\bin\gpg.exe&quot;</code> as described by various other online tutorials and answers</li>
  <li>set <code>git config --global commit.gpgsign</code> to true</li>
  </ol>
  <ul>
  <li>already looked at <a href="https://stackoverflow.com/questions/61849061/no-secret-key-error-when-signing-git-commit-on-windows">&quot;No secret key&quot; error when signing git commit on Windows</a>, <a href="https://stackoverflow.com/questions/42117385/gpg-skipped-n-secret-key-not-available">gpg: skipped &quot;N&quot;: secret key not available</a> and <a href="https://stackoverflow.com/questions/36810467/git-commit-signing-failed-secret-key-not-available">git commit signing failed: secret key not available</a></li>
  </ul>
  <h1>Expected result:</h1>
  <p>Successfully submit a verified commit</p>
  <h2>bonus info</h2>
  <ul>
  <li>Git version: 2.36.0.windows.1</li>
  <li>OS: windows 11 22000.613</li>
  </ul>