Home > Software engineering >  Changing key format for signing commits
Changing key format for signing commits

Time:07-12

I'm trying to set a gpg key to sign comments for work. Yesterday I tried to use the ssh key to do that and I changed the format to ssh with the commnand git config [--global] gpg.format ssh, but today I generated a gpg key and I would like to use that instead of the ssh but now I don't know how to change the format because if I use the same command and change ssh to gpg it gives me this error:

error: unsupported value for gpg.format: pgp fatal: bad config variable 'gpg.format' in file 'C:/Users/....

Anyone knows how to reset this or change to gpg again? thanks all!

CodePudding user response:

Possible values are "openpgp", "x509", "ssh". You need "openpgp":

git config --global gpg.format openpgp

This is the default value so you can just remove the key at all:

git config --global --unset gpg.format
  • Related