From: Nicolas Graves <ngraves@ngraves.fr>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: git@vger.kernel.org
Subject: Re: Error / feature-request: Signing git commits with SSH hardware key
Date: Wed, 12 Oct 2022 08:54:00 +0200 [thread overview]
Message-ID: <87leplv8fr.fsf@ngraves.fr> (raw)
In-Reply-To: <87r0zeuhrv.fsf@ngraves.fr>
>> error: Couldn't load public key sk-ssh-ed25519@openssh.com AAAAG[..]zaDo=: No such file or directory?
>
Sorry, I still do have this error, even though the previous one
disappeared (it verified a commit signed byb another key) and my
configuration is OK.
No such file or directory would indicate I don't own the key. I've
verified I have the key on my Yubikey5C, in the directory ~/.ssh with
the right condition, and additionnaly I've imported it in ssh-agent with
ssh-add.
Using the GIT_TRACE=2 env variable, I get this:
08:32:41.916712 git.c:460 trace: built-in: git commit -m test
08:32:41.917380 run-command.c:655 trace: run_command: ssh-keygen -Y sign -n git -f 'sk-ssh-ed25519@openssh.com AAAAG[...]zaDo=' /tmp/.git_signing_buffer_tmp6Dc0Mx
The ssh-keygen manual indicates the following:
-Y sign
Cryptographically sign a file or some data using a SSH key. When
signing, ssh-keygen accepts zero or more files to sign on the
command-line - if no files are specified then ssh-keygen will
sign data presented on standard input. Signatures are written to
the path of the input file with “.sig” appended, or to standard
output if the message to be signed was read from standard input.
The key used for signing is specified using the -f option and may
refer to either a private key, or a public key with the private
half available via ssh-agent(1). An additional signature name‐
space, used to prevent signature confusion across different do‐
mains of use (e.g. file signing vs email signing) must be pro‐
vided via the -n flag. Namespaces are arbitrary strings, and may
include: “file” for file signing, “email” for email signing. For
custom uses, it is recommended to use names following a NAME‐
SPACE@YOUR.DOMAIN pattern to generate unambiguous namespaces.
Running ssh-add -L, I can confirm that the private half is available via
ssh-agent.
I've also check that the error doesn't come from the missing input file (used to
sign), here /tmp/.git_signing_buffer_tmp6Dc0Mx . Re-running the
ssh-keygen command with a mock file fails with the same error.
I don't really know where to investigate next. What I get is that the
error probably comes from ssh (should I report it there? The problem
feels isolated now that I know which command fails). I may try to
update openssh to v9, but since I'm using guix that might be quick as
well as tedious.
--
Best regards,
Nicolas Graves
next prev parent reply other threads:[~2022-10-12 6:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 18:12 Error / feature-request: Signing git commits with SSH hardware key Nicolas Graves
2022-10-11 20:41 ` brian m. carlson
2022-10-11 21:54 ` Nicolas Graves
2022-10-11 22:17 ` Nicolas Graves
2022-10-12 6:54 ` Nicolas Graves [this message]
2022-10-12 6:55 ` Fabian Stelzer
2022-10-12 7:22 ` Nicolas Graves
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=87leplv8fr.fsf@ngraves.fr \
--to=ngraves@ngraves.fr \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.