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

Wrong exit code on failed SSH signing

From
SKSergey Kosukhin <skosukhin@gmail.com>
Date
Feb 6, 2024, 16:24 UTC
Message-ID
<CAGMF1KiFNnr1nFBg2+mRqiurXpxOOXAcoWc0GciRKDoWzpJSkA@mail.gmail.com>
Hello!

There seems to be a bug in the sign_buffer_ssh function in gpg-interface.c: a possible exit code of ssh-keygen is 255, which is returned as-is by sign_buffer_ssh. The problem is that, for example, the function build_tag_object in builtin/tag.c considers only negative values as a failure. Since 255 >= 0, the error message "unable to sign the tag" is not emitted and git exits normally with zero exit code. It might be enough to return -1 in sign_buffer_ssh if ret is not zero.

I am sorry if this has already been reported or taken care of. Thank you.

Best regards, Sergey

Next: Junio C Hamano
Message 1 of 2 in “Wrong exit code on failed SSH signing”
  1. Sergey KosukhinFeb 6, 2024
  2. Junio C HamanoFeb 6, 2024

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.