summaryrefslogtreecommitdiff
path: root/Documentation/config
diff options
context:
space:
mode:
authorLibravatar Fabian Stelzer <fs@gigacodes.de>2021-09-10 20:07:37 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-10 14:15:52 -0700
commitfd9e226776d1874af36b6b02fb2002b917af42fa (patch)
treeda80798e14ecfd3bd50b5cee32cf211b6e1c53f1 /Documentation/config
parentssh signing: add ssh key format and signing code (diff)
downloadtgif-fd9e226776d1874af36b6b02fb2002b917af42fa.tar.xz
ssh signing: retrieve a default key from ssh-agent
If user.signingkey is not set and a ssh signature is requested we call gpg.ssh.defaultKeyCommand (typically "ssh-add -L") and use the first key we get Signed-off-by: Fabian Stelzer <fs@gigacodes.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config')
-rw-r--r--Documentation/config/gpg.txt6
-rw-r--r--Documentation/config/user.txt4
2 files changed, 9 insertions, 1 deletions
diff --git a/Documentation/config/gpg.txt b/Documentation/config/gpg.txt
index 88531b15f0..9b95dd280c 100644
--- a/Documentation/config/gpg.txt
+++ b/Documentation/config/gpg.txt
@@ -33,3 +33,9 @@ gpg.minTrustLevel::
* `marginal`
* `fully`
* `ultimate`
+
+gpg.ssh.defaultKeyCommand:
+ This command that will be run when user.signingkey is not set and a ssh
+ signature is requested. On successful exit a valid ssh public key is
+ expected in the first line of its output. To automatically use the first
+ available key from your ssh-agent set this to "ssh-add -L".
diff --git a/Documentation/config/user.txt b/Documentation/config/user.txt
index 2155128957..ad78dce9ec 100644
--- a/Documentation/config/user.txt
+++ b/Documentation/config/user.txt
@@ -40,4 +40,6 @@ user.signingKey::
key (e.g.: "ssh-rsa XXXXXX identifier") or a file which contains it and
corresponds to the private key used for signing. The private key
needs to be available via ssh-agent. Alternatively it can be set to
- a file containing a private key directly.
+ a file containing a private key directly. If not set git will call
+ gpg.ssh.defaultKeyCommand (e.g.: "ssh-add -L") and try to use the first
+ key available.