12

I cannot commit to git . Every time I try it shows this message.

error: Couldn't load public key 632EA751459C3A1A: No such file or directory?

fatal: failed to write commit object

I'm using Gpg4Win.

Dinuka Dilshan
  • 552
  • 6
  • 12
  • Running into this issue as well, with a recently new update of Gpg4Win. It was working before. :shrug: If you've resolved this I'd love to know what it took. Assuming that gnupg can't find the pubring it created. – Kit Plummer Sep 22 '22 at 14:03

3 Answers3

16

I believe I resolved my issue, perhaps it is the same for you. For some reason I'd set the gpg.format value to "SSH" in my local Git config.

Simply removing that from my ~/.gitconfig allowed Gpg4Win to resolve the correct location of the key.

Kit Plummer
  • 583
  • 1
  • 3
  • 10
0

Telling Git about your signing key

To sign commits locally, you need to inform Git that there's a GPG, SSH, or X.509 key you'd like to use.

itsazzad
  • 6,868
  • 7
  • 69
  • 89
-3

remove format = ssh from ~/.gitconfig

J. Ceron
  • 1,188
  • 10
  • 8