Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Mar 6, 2026, 01:23 UTC
- Message-ID
- <aaosmo1Iluc5KeZw@fruit.crustytoothpaste.net>
- In-Reply-To
- <CAAaskFANnrqTAjQOHhAgzES9=S+y7w9u-LMWbRbi8FayVdvzFw@mail.gmail.com>
On 2026-03-06 at 01:05:58, Ivan Ivanov wrote:
Show 23 quoted lines
> To clarify, in addition to t0300-credentials.out , > t0301-credential-cache.out and t0302-credential-store.out are also > failing, however a similar-by-nature t0303-credential-external.out > succeeds fine. Very strange. Seeing how it's leaking to the primary > console, I suspect something may be wrong with shell handling: i.e. > for t0302-credential-store test I am seeing these prompts that are > waiting input for a user (could write any message here or just press > Enter to get a new prompt) : > > Username for 'https://example.com': > Password for 'https://%20@example.com': > Username for 'http://example.com': > Password for 'http://example.com': > Username for 'https://other.tld': > Password for 'https://other.tld': > Password for 'https://other@example.com': > Username for 'http://path.tld/bar.git': > Password for 'http://path.tld/bar.git': > Password for 'https://user-overwrite@example.com': > Username for 'https://example.com': > Password for 'https://example.com': > Password for 'https://user1@example.com': > Username for 'https://example.com':
To help us understand more, can you provide the output of `git version --build-options` on the affected version, as well as the shell you're using (bash, dash, etc. and version) and any configuration options you're using to build?
Using Debian unstable with Debian's dash 0.5.12-12 as `/bin/sh`, I don't see this problem when running with the following command in zsh:
time make -j12 all && (cd t && ulimit -c unlimited && GIT_PROVE_OPTS=-j12 GIT_TEST_DEFAULT_HASH=sha256 ./t0300*.sh --verbose --debug)
Note that Git should not prompt on the command line because of the following code in `t/lib-credential.sh`:
write_script askpass <<\EOF
echo >&2 askpass: $*
what=$(echo $1 | cut -d" " -f1 | tr A-Z a-z | tr -cd a-z)
echo "askpass-$what"
EOF
GIT_ASKPASS="$PWD/askpass"
export GIT_ASKPASS-- brian m. carlson (they/them) Toronto, Ontario, CA