git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Unable to use security key to commit signing using SSH keypair

From
Fabian Stelzer <fs@gigacodes.de>
Date
Jun 28, 2022, 16:23 UTC
Message-ID
<20220628162342.ootjobbjtxg7b7ay@fs>
In-Reply-To
<97adcd90-b4d3-1114-205b-3445dd48b497@gmail.com>
On 27.06.2022 21:09, Marcos Alano wrote:
Show 9 quoted lines
>Hello fellows!
>
>I'm able to sign commits using SSH keypair, but the keypair must be 
>located in a file. If I try to use a SSH keypair in a security key 
>(like an YubiKey) I get an error. I used this commands to do the test:
>```
>ssh-keygen -t ed25519-sk -f ~/.ssh/id_ed25519_sk
>git config --global gpg.format ssh
>git config --global user.signingkey "$(cat ~/.ssh/id_ed25519_sk.pub)"

Did you try just putting the public keys path into user.signingkey? Literal keys would need to be prefixed with `key::`

git config --global user.signingkey ~/.ssh/id_ed25519_sk.pub should be just fine.

Also, the private key needs to be available in your ssh agent. If in doubt you can check with a `ssh-add -L`.

Show 17 quoted lines
>git commit -S --allow-empty --message="Testing"
>```
>
>Bnd I get this error:
>```
>error: Couldn't load public key sk-ssh-ed25519@openssh.com <my key 
>id>: No such file or directory?
>
>fatal: failed to write commit object
>```
>I did the same thing with a plain ed25519 keypair and worked.
>
>Am I doing anything wrong or security keys aren't supported yet?
>
>Thank you for any help,
>-- 
>Marcos Alano
Previous: Marcos AlanoNext: Marcos Alano
Message 2 of 3 in “Unable to use security key to commit signing using SSH keypair”
  1. Marcos AlanoJun 28, 2022
  2. Fabian StelzerJun 28, 2022
  3. Marcos AlanoJun 28, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.