* Clarification on GPG preference update prompts during Git test suite execution
@ 2025-06-04 9:39 Haritha D
2025-06-04 11:13 ` Chris Torek
0 siblings, 1 reply; 3+ messages in thread
From: Haritha D @ 2025-06-04 9:39 UTC (permalink / raw)
To: git@vger.kernel.org
Hi Team,
I wanted help regarding the below scenario:
While running the test suite for the latest Git version, I observed that some test cases—particularly t5573-pull-verify-signatures.sh—prompt for input with the message:
Really update the preferences? (y/N)
I attempted to work around this by piping yes n, but the prompt still appears, causing the tests to wait for user input.
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?
Any insights on how this is managed or best practices to handle such cases in automated environments would be greatly appreciated.
Thanks & regards
Haritha
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Clarification on GPG preference update prompts during Git test suite execution
2025-06-04 9:39 Clarification on GPG preference update prompts during Git test suite execution Haritha D
@ 2025-06-04 11:13 ` Chris Torek
2025-06-04 16:20 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Chris Torek @ 2025-06-04 11:13 UTC (permalink / raw)
To: Haritha D; +Cc: git@vger.kernel.org
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).
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Clarification on GPG preference update prompts during Git test suite execution
2025-06-04 11:13 ` Chris Torek
@ 2025-06-04 16:20 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2025-06-04 16:20 UTC (permalink / raw)
To: Chris Torek; +Cc: Haritha D, git@vger.kernel.org
Chris Torek <chris.torek@gmail.com> writes:
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-04 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-04 9:39 Clarification on GPG preference update prompts during Git test suite execution Haritha D
2025-06-04 11:13 ` Chris Torek
2025-06-04 16:20 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).