尝试在我的 Debian 机器上设置 git commit 签名。我的 Windows 盒子上已经有了这个设置,而且工作正常。在我的 Debian 盒子上没有那么多。当我尝试提交时出现以下错误:
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
这是我的配置
siggib@htzn:/var/www/phpdemo$ git config --list
user.name=siggib@htzn
user.email=siggib007@users.noreply.github.com
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$
我试着用谷歌搜索这个但没有发现任何有用的东西,也尝试在这里搜索得到相同的结果。有人对我有什么好的建议吗?
最佳答案
SSH 签名仅适用于 git>=2.34
( changelog )。您可能使用的是旧版本。
你可以这样检查:
$ git --version
git version 2.25.1
如果您使用的是 Ubuntu,您可以获得这样的更新版本:
$ sudo add-apt-repository ppa:git-core/ppa -y
$ sudo apt-get update
$ sudo apt-get upgrade
https://stackoverflow.com/questions/74722894/