From: Bingwu Zhang <xtex@envs.net>
To: "Kernel . org Tools" <tools@kernel.org>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
Bingwu Zhang <xtex@astrafall.org>
Subject: [PATCH] Support SSH user.signingkey
Date: Sun, 29 Mar 2026 07:22:34 +0800 [thread overview]
Message-ID: <20260328232233.57299-2-xtex@envs.net> (raw)
From: Bingwu Zhang <xtex@astrafall.org>
Check gpg.format to see if user.signingkey is a SSH
key.
Signed-off-by: Bingwu Zhang <xtex@astrafall.org>
---
src/patatt/__init__.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/patatt/__init__.py b/src/patatt/__init__.py
index ae8f21ea104f..ac610b87bc6d 100644
--- a/src/patatt/__init__.py
+++ b/src/patatt/__init__.py
@@ -1312,10 +1312,13 @@ def get_algo_keydata(config: GitConfigType) -> Tuple[str, str]:
return algo, keydata
if not config.get('signingkey'):
- if usercfg.get('signingkey'):
- logger.info('N: Using pgp key %s defined by user.signingkey', usercfg.get('signingkey'))
+ user_signingkey = usercfg.get('signingkey')
+ if user_signingkey:
+ gpg_format = get_config_from_git(r'gpg\..*').get('format', 'gpg')
+ key_algo = 'openssh' if gpg_format == 'ssh' else 'openpgp'
+ logger.info('N: Using %s key %s defined by user.signingkey', key_algo, user_signingkey)
logger.info('N: Override by setting patatt.signingkey')
- config['signingkey'] = 'openpgp:%s' % usercfg.get('signingkey')
+ config['signingkey'] = '%s:%s' % (key_algo, user_signingkey)
else:
logger.critical('E: patatt.signingkey is not set')
logger.critical('E: Perhaps you need to run genkey first?')
base-commit: d8ea60b65cad9b92003eef92153457736652e2bd
--
2.52.0
next reply other threads:[~2026-03-28 23:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 23:22 Bingwu Zhang [this message]
2026-04-10 14:36 ` [PATCH] Support SSH user.signingkey Konstantin Ryabitsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260328232233.57299-2-xtex@envs.net \
--to=xtex@envs.net \
--cc=konstantin@linuxfoundation.org \
--cc=tools@kernel.org \
--cc=xtex@astrafall.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox