git-ecosystem / git-ecosystem/git-credential-manager

Git tests t0303-credential-external fail "Cannot prompt because user interactivity has been disabled"

Open
#1,451 0 comments 0 reactions 1 assignee View on GitHub

@mjcheetham is already working on this.

Since Oct 30, 2023.

Dominant language
C#
Stars
9.3k
Forks
2.9k
Avg merge
7d 1h
Merged PRs (30d)
14

Description

Git includes a set of tests for credential helpers https://github.com/git/git/blob/master/t/t0303-credential-external.sh

This is a tool for authors of external helper tools to sanity-check their helpers.

I tried to test GCM with cache store choosing appropriate non-interactive options:

GIT_TEST_CREDENTIAL_HELPER=manager GCM_CREDENTIAL_STORE=cache GCM_GUI_PROMPT=0 GCM_INTERACTIVE=never GCM_AUTODETECT_TIMEOUT=0 ./t0303-credential-external.sh -v

15 of 21 tests fail.

10 tests fail because GCM prints an unexpected line to stderr "Cannot prompt because user interactivity has been disabled.". t0303-credential-external.sh assumes that a helper exits silently status 0 if it can't find a credential. This is the behaviour of other helpers including credential-cache and credential-store.

5 tests fail for various more interesting reasons.

If possible, it would be nice to change GCM to exit silently status 0 like other helpers. Alternatively, define a GCM_SILENT_EXIT option with this behaviour.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.