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

Re: Clarification on GPG preference update prompts during Git test suite execution

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 4, 2025, 16:20 UTC
Message-ID
<xmqqtt4vbhrn.fsf@gitster.g>
In-Reply-To
<CAPx1Gvd9pUbfyq_AuQmqTqNY=mB+=agoreKR5DfphNNgc8md6A@mail.gmail.com>
Chris Torek <chris.torek@gmail.com> writes:
Show 12 quoted lines
> On Wed, Jun 4, 2025 at 2:39 AM Haritha D <Harithamma.D@ibm.com> wrote:
>> I noticed that the ci/run-build-and-tests.sh script in the Git repo does not seem to explicitly handle this scenario (e.g., no --batch, --yes, or other flags related to GPG). I’m curious—how does Git's CI/CD pipeline avoid or suppress these GPG interactive prompts during test execution?
>
> GPG does not go through Git. GPG uses the "grab hold of the user who's
> watching this and ask a question" interface provided by the operating
> system. CI systems disable this interface (or do their best to attempt
> to do so) since there is no user watching.
>
> Since Git is not involved here, Git has no control over this. You need
> to deal with this at the GPG level (or use the same tricks that CI
> systems use, but those are considerably more complex, and
> OS-dependent).

We do redirect our stdin to read from /dev/null but that is the extent we attempt to go non-interactive while running the tests, which, as you said, is insufficient to defeat applications opening up /dev/tty or going GUI.

Previous: Chris Torek
Message 3 of 3 in “Clarification on GPG preference update prompts during Git test suite execution”
  1. Haritha DJun 4, 2025
  2. Chris TorekJun 4, 2025
  3. Junio C HamanoJun 4, 2025

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.