Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git commit failed : Couldn't load public key

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.

like image 353
Dinuka Dilshan Avatar asked Aug 31 '25 20:08

Dinuka Dilshan


2 Answers

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.

like image 123
Kit Plummer Avatar answered Sep 03 '25 10:09

Kit Plummer


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.

like image 44
itsazzad Avatar answered Sep 03 '25 10:09

itsazzad