]> git.ipfire.org Git - thirdparty/git.git/commit - gpg-interface.c
ssh signing: add ssh key format and signing code
authorFabian Stelzer <fs@gigacodes.de>
Fri, 10 Sep 2021 20:07:36 +0000 (20:07 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Sep 2021 21:15:51 +0000 (14:15 -0700)
commit29b315778e958417a411f02b6d4b5a0fc9d731e2
tree647bc9f83957790eed589a177511ebc6bafdb0c5
parent64625c728fc281181e6dc6c0b8b538f0fbe47a30
ssh signing: add ssh key format and signing code

Implements the actual sign_buffer_ssh operation and move some shared
cleanup code into a strbuf function

Set gpg.format = ssh and user.signingkey to either a ssh public key
string (like from an authorized_keys file), or a ssh key file.
If the key file or the config value itself contains only a public key
then the private key needs to be available via ssh-agent.

gpg.ssh.program can be set to an alternative location of ssh-keygen.
A somewhat recent openssh version (8.2p1+) of ssh-keygen is needed for
this feature. Since only ssh-keygen is needed it can this way be
installed seperately without upgrading your system openssh packages.

Signed-off-by: Fabian Stelzer <fs@gigacodes.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/gpg.txt
Documentation/config/user.txt
gpg-interface.c