Trying to setup git commit signing on my Debian box. I already have this setup on my windows box and it works fine. Not so much on my Debian box. There I get the following error when I try to commit:
siggib@htzn:/var/www/phpdemo$ git commit -m "tweak"
error: unsupported value for gpg.format: ssh
fatal: bad config variable 'gpg.format' in file '/home/siggib/.gitconfig' at line 6
Here what my config looks like
siggib@htzn:/var/www/phpdemo$ git config --list
user.name=siggib@htzn
[email protected]
user.signingkey=ssh-ed25519 AAAAC3NzaC.....
gpg.format=ssh
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://github.com/siggib007/phptest.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
siggib@htzn:/var/www/phpdemo$
I tried to google this and found nothing useful, also tried searching here with same results. Anyone have any good pointers for me?
2
Answers
Turns out SSH signing is not available in the default git version in Debian 11. Had to follow this https://stackoverflow.com/a/74528937/8549454 to install a more up to date git version.
SSH signing is only available with
git>=2.34
(changelog). You likely have an older version.You can check like this:
Update git
If you are on Ubuntu, you can get a more recent version like this: