* Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
@ 2026-03-06 0:42 Ivan Ivanov
2026-03-06 1:05 ` Ivan Ivanov
0 siblings, 1 reply; 12+ messages in thread
From: Ivan Ivanov @ 2026-03-06 0:42 UTC (permalink / raw)
To: git
Good day! While trying to rebuild git for Arch/Artix, I run into the
following problem: shortly after "*** prove (shell & unit tests) ***"
I get asked the Username/Password in an endless loop. Below are the
full logs, as well as the contents of
./test-results/t0300-credentials.out file, hope this is helpful for
debugging. Please note that I have all the dependencies installed,
even the optional ones like Apache HTTPD (some online manuals
suggested doing that, but didn't help to pass this test)
==> Starting check()...
GEN git-difftool--helper
GEN git-filter-branch
GEN git-merge-octopus
GEN git-merge-one-file
GEN git-merge-resolve
GEN git-mergetool
GEN git-quiltimport
GEN git-request-pull
GEN git-submodule
GEN git-web--browse
GEN git-archimport
GEN git-cvsexportcommit
GEN git-cvsimport
GEN git-cvsserver
GEN git-send-email
GEN git-svn
GEN git-p4
GEN git-instaweb
GEN git-mergetool--lib
GEN git-sh-i18n
GEN git-sh-setup
SUBDIR git-gui
SUBDIR gitk-git
SUBDIR templates
GEN perl/build/lib/Git.pm
GEN perl/build/lib/Git/I18N.pm
GEN perl/build/lib/Git/IndexInfo.pm
GEN perl/build/lib/Git/LoadCPAN.pm
GEN perl/build/lib/Git/Packet.pm
GEN perl/build/lib/Git/SVN.pm
GEN perl/build/lib/Git/LoadCPAN/Error.pm
GEN perl/build/lib/Git/SVN/Editor.pm
GEN perl/build/lib/Git/SVN/Fetcher.pm
GEN perl/build/lib/Git/SVN/GlobSpec.pm
GEN perl/build/lib/Git/SVN/Log.pm
GEN perl/build/lib/Git/SVN/Migration.pm
GEN perl/build/lib/Git/SVN/Prompt.pm
GEN perl/build/lib/Git/SVN/Ra.pm
GEN perl/build/lib/Git/SVN/Utils.pm
GEN perl/build/lib/Git/LoadCPAN/Mail/Address.pm
GEN perl/build/lib/Git/SVN/Memoize/YAML.pm
make -C t/ all
make[1]: Entering directory '/home/username/artix_git/src/git/t'
rm -f -r 'test-results'
*** prove (shell & unit tests) ***
Username for 'http://example.com':
Password for 'http://example.com':
Username for 'http://example.com':
Password for 'http://example.com':
/src/git/t$ cat ./test-results/t0300-credentials.out
Initialized empty Git repository in /dev/shm/git-test/trash
directory.t0300-credentials/.git/
expecting success of 0300.1 'setup helper scripts':
cat >dump <<-\EOF &&
whoami=$(echo $0 | sed s/.*git-credential-//)
echo >&2 "$whoami: $*"
OIFS=$IFS
IFS==
while read key value; do
echo >&2 "$whoami: $key=$value"
if test -z "${key%%*\[\]}"
then
key=${key%%\[\]}
eval "$key=\"\$$key $value\""
else
eval "$key=$value"
fi
done
IFS=$OIFS
EOF
write_script git-credential-useless <<-\EOF &&
. ./dump
exit 0
EOF
write_script git-credential-quit <<-\EOF &&
. ./dump
echo quit=1
EOF
write_script git-credential-verbatim <<-\EOF &&
user=$1; shift
pass=$1; shift
. ./dump
test -z "$user" || echo username=$user
test -z "$pass" || echo password=$pass
EOF
write_script git-credential-verbatim-cred <<-\EOF &&
authtype=$1; shift
credential=$1; shift
. ./dump
echo capability[]=authtype
echo capability[]=state
test -z "${capability##*authtype*}" || exit 0
test -z "$authtype" || echo authtype=$authtype
test -z "$credential" || echo credential=$credential
test -z "${capability##*state*}" || exit 0
echo state[]=verbatim-cred:foo
EOF
write_script git-credential-verbatim-ephemeral <<-\EOF &&
authtype=$1; shift
credential=$1; shift
. ./dump
echo capability[]=authtype
test -z "${capability##*authtype*}" || exit 0
test -z "$authtype" || echo authtype=$authtype
test -z "$credential" || echo credential=$credential
echo "ephemeral=1"
EOF
write_script git-credential-verbatim-with-expiry <<-\EOF &&
user=$1; shift
pass=$1; shift
pexpiry=$1; shift
. ./dump
test -z "$user" || echo username=$user
test -z "$pass" || echo password=$pass
test -z "$pexpiry" || echo password_expiry_utc=$pexpiry
EOF
write_script git-credential-cntrl-in-username <<-\EOF &&
printf "username=\\007latrix Lestrange\\n"
EOF
PATH="$PWD:$PATH"
ok 1 - setup helper scripts
expecting success of 0300.2 'credential_fill invokes helper':
check fill "verbatim foo bar" <<-\EOF
protocol=http
host=example.com
--
protocol=http
host=example.com
username=foo
password=bar
--
verbatim: get
verbatim: protocol=http
verbatim: host=example.com
EOF
--- expect-stdout 2026-03-06 00:33:02.009338195 +0000
+++ stdout 2026-03-06 00:33:07.569338321 +0000
@@ -1,4 +1,4 @@
protocol=http
host=example.com
-username=foo
-password=bar
+username=
+password=
not ok 2 - credential_fill invokes helper
#
# check fill "verbatim foo bar" <<-\EOF
# protocol=http
# host=example.com
# --
# protocol=http
# host=example.com
# username=foo
# password=bar
# --
# verbatim: get
# verbatim: protocol=http
# verbatim: host=example.com
# EOF
#
expecting success of 0300.3 'credential_fill invokes helper with credential':
check fill "verbatim-cred Bearer token" <<-\EOF
capability[]=authtype
protocol=http
host=example.com
--
capability[]=authtype
authtype=Bearer
credential=token
protocol=http
host=example.com
--
verbatim-cred: get
verbatim-cred: capability[]=authtype
verbatim-cred: protocol=http
verbatim-cred: host=example.com
EOF
--- expect-stdout 2026-03-06 00:33:07.581338322 +0000
+++ stdout 2026-03-06 00:33:08.191338336 +0000
@@ -1,5 +1,4 @@
-capability[]=authtype
-authtype=Bearer
-credential=token
protocol=http
host=example.com
+username=
+password=
not ok 3 - credential_fill invokes helper with credential
#
# check fill "verbatim-cred Bearer token" <<-\EOF
# capability[]=authtype
# protocol=http
# host=example.com
# --
# capability[]=authtype
# authtype=Bearer
# credential=token
# protocol=http
# host=example.com
# --
# verbatim-cred: get
# verbatim-cred: capability[]=authtype
# verbatim-cred: protocol=http
# verbatim-cred: host=example.com
# EOF
#
expecting success of 0300.4 'credential_fill invokes helper with
ephemeral credential':
check fill "verbatim-ephemeral Bearer token" <<-\EOF
capability[]=authtype
protocol=http
host=example.com
--
capability[]=authtype
authtype=Bearer
credential=token
ephemeral=1
protocol=http
host=example.com
--
verbatim-ephemeral: get
verbatim-ephemeral: capability[]=authtype
verbatim-ephemeral: protocol=http
verbatim-ephemeral: host=example.com
EOF
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
2026-03-06 0:42 Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop Ivan Ivanov
@ 2026-03-06 1:05 ` Ivan Ivanov
2026-03-06 1:23 ` brian m. carlson
0 siblings, 1 reply; 12+ messages in thread
From: Ivan Ivanov @ 2026-03-06 1:05 UTC (permalink / raw)
To: git
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':
...
On Fri, Mar 6, 2026 at 3:42 AM Ivan Ivanov <qmastery16@gmail.com> wrote:
>
> Good day! While trying to rebuild git for Arch/Artix, I run into the
> following problem: shortly after "*** prove (shell & unit tests) ***"
> I get asked the Username/Password in an endless loop. Below are the
> full logs, as well as the contents of
> ./test-results/t0300-credentials.out file, hope this is helpful for
> debugging. Please note that I have all the dependencies installed,
> even the optional ones like Apache HTTPD (some online manuals
> suggested doing that, but didn't help to pass this test)
>
> ==> Starting check()...
> GEN git-difftool--helper
> GEN git-filter-branch
> GEN git-merge-octopus
> GEN git-merge-one-file
> GEN git-merge-resolve
> GEN git-mergetool
> GEN git-quiltimport
> GEN git-request-pull
> GEN git-submodule
> GEN git-web--browse
> GEN git-archimport
> GEN git-cvsexportcommit
> GEN git-cvsimport
> GEN git-cvsserver
> GEN git-send-email
> GEN git-svn
> GEN git-p4
> GEN git-instaweb
> GEN git-mergetool--lib
> GEN git-sh-i18n
> GEN git-sh-setup
> SUBDIR git-gui
> SUBDIR gitk-git
> SUBDIR templates
> GEN perl/build/lib/Git.pm
> GEN perl/build/lib/Git/I18N.pm
> GEN perl/build/lib/Git/IndexInfo.pm
> GEN perl/build/lib/Git/LoadCPAN.pm
> GEN perl/build/lib/Git/Packet.pm
> GEN perl/build/lib/Git/SVN.pm
> GEN perl/build/lib/Git/LoadCPAN/Error.pm
> GEN perl/build/lib/Git/SVN/Editor.pm
> GEN perl/build/lib/Git/SVN/Fetcher.pm
> GEN perl/build/lib/Git/SVN/GlobSpec.pm
> GEN perl/build/lib/Git/SVN/Log.pm
> GEN perl/build/lib/Git/SVN/Migration.pm
> GEN perl/build/lib/Git/SVN/Prompt.pm
> GEN perl/build/lib/Git/SVN/Ra.pm
> GEN perl/build/lib/Git/SVN/Utils.pm
> GEN perl/build/lib/Git/LoadCPAN/Mail/Address.pm
> GEN perl/build/lib/Git/SVN/Memoize/YAML.pm
> make -C t/ all
> make[1]: Entering directory '/home/username/artix_git/src/git/t'
> rm -f -r 'test-results'
> *** prove (shell & unit tests) ***
> Username for 'http://example.com':
> Password for 'http://example.com':
> Username for 'http://example.com':
> Password for 'http://example.com':
>
> /src/git/t$ cat ./test-results/t0300-credentials.out
> Initialized empty Git repository in /dev/shm/git-test/trash
> directory.t0300-credentials/.git/
> expecting success of 0300.1 'setup helper scripts':
> cat >dump <<-\EOF &&
> whoami=$(echo $0 | sed s/.*git-credential-//)
> echo >&2 "$whoami: $*"
> OIFS=$IFS
> IFS==
> while read key value; do
> echo >&2 "$whoami: $key=$value"
> if test -z "${key%%*\[\]}"
> then
> key=${key%%\[\]}
> eval "$key=\"\$$key $value\""
> else
> eval "$key=$value"
> fi
> done
> IFS=$OIFS
> EOF
>
> write_script git-credential-useless <<-\EOF &&
> . ./dump
> exit 0
> EOF
>
> write_script git-credential-quit <<-\EOF &&
> . ./dump
> echo quit=1
> EOF
>
> write_script git-credential-verbatim <<-\EOF &&
> user=$1; shift
> pass=$1; shift
> . ./dump
> test -z "$user" || echo username=$user
> test -z "$pass" || echo password=$pass
> EOF
>
> write_script git-credential-verbatim-cred <<-\EOF &&
> authtype=$1; shift
> credential=$1; shift
> . ./dump
> echo capability[]=authtype
> echo capability[]=state
> test -z "${capability##*authtype*}" || exit 0
> test -z "$authtype" || echo authtype=$authtype
> test -z "$credential" || echo credential=$credential
> test -z "${capability##*state*}" || exit 0
> echo state[]=verbatim-cred:foo
> EOF
>
> write_script git-credential-verbatim-ephemeral <<-\EOF &&
> authtype=$1; shift
> credential=$1; shift
> . ./dump
> echo capability[]=authtype
> test -z "${capability##*authtype*}" || exit 0
> test -z "$authtype" || echo authtype=$authtype
> test -z "$credential" || echo credential=$credential
> echo "ephemeral=1"
> EOF
>
> write_script git-credential-verbatim-with-expiry <<-\EOF &&
> user=$1; shift
> pass=$1; shift
> pexpiry=$1; shift
> . ./dump
> test -z "$user" || echo username=$user
> test -z "$pass" || echo password=$pass
> test -z "$pexpiry" || echo password_expiry_utc=$pexpiry
> EOF
>
> write_script git-credential-cntrl-in-username <<-\EOF &&
> printf "username=\\007latrix Lestrange\\n"
> EOF
>
> PATH="$PWD:$PATH"
>
> ok 1 - setup helper scripts
>
> expecting success of 0300.2 'credential_fill invokes helper':
> check fill "verbatim foo bar" <<-\EOF
> protocol=http
> host=example.com
> --
> protocol=http
> host=example.com
> username=foo
> password=bar
> --
> verbatim: get
> verbatim: protocol=http
> verbatim: host=example.com
> EOF
>
> --- expect-stdout 2026-03-06 00:33:02.009338195 +0000
> +++ stdout 2026-03-06 00:33:07.569338321 +0000
> @@ -1,4 +1,4 @@
> protocol=http
> host=example.com
> -username=foo
> -password=bar
> +username=
> +password=
> not ok 2 - credential_fill invokes helper
> #
> # check fill "verbatim foo bar" <<-\EOF
> # protocol=http
> # host=example.com
> # --
> # protocol=http
> # host=example.com
> # username=foo
> # password=bar
> # --
> # verbatim: get
> # verbatim: protocol=http
> # verbatim: host=example.com
> # EOF
> #
>
> expecting success of 0300.3 'credential_fill invokes helper with credential':
> check fill "verbatim-cred Bearer token" <<-\EOF
> capability[]=authtype
> protocol=http
> host=example.com
> --
> capability[]=authtype
> authtype=Bearer
> credential=token
> protocol=http
> host=example.com
> --
> verbatim-cred: get
> verbatim-cred: capability[]=authtype
> verbatim-cred: protocol=http
> verbatim-cred: host=example.com
> EOF
>
> --- expect-stdout 2026-03-06 00:33:07.581338322 +0000
> +++ stdout 2026-03-06 00:33:08.191338336 +0000
> @@ -1,5 +1,4 @@
> -capability[]=authtype
> -authtype=Bearer
> -credential=token
> protocol=http
> host=example.com
> +username=
> +password=
> not ok 3 - credential_fill invokes helper with credential
> #
> # check fill "verbatim-cred Bearer token" <<-\EOF
> # capability[]=authtype
> # protocol=http
> # host=example.com
> # --
> # capability[]=authtype
> # authtype=Bearer
> # credential=token
> # protocol=http
> # host=example.com
> # --
> # verbatim-cred: get
> # verbatim-cred: capability[]=authtype
> # verbatim-cred: protocol=http
> # verbatim-cred: host=example.com
> # EOF
> #
>
> expecting success of 0300.4 'credential_fill invokes helper with
> ephemeral credential':
> check fill "verbatim-ephemeral Bearer token" <<-\EOF
> capability[]=authtype
> protocol=http
> host=example.com
> --
> capability[]=authtype
> authtype=Bearer
> credential=token
> ephemeral=1
> protocol=http
> host=example.com
> --
> verbatim-ephemeral: get
> verbatim-ephemeral: capability[]=authtype
> verbatim-ephemeral: protocol=http
> verbatim-ephemeral: host=example.com
> EOF
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
2026-03-06 1:05 ` Ivan Ivanov
@ 2026-03-06 1:23 ` brian m. carlson
2026-03-06 1:44 ` Ivan Ivanov
0 siblings, 1 reply; 12+ messages in thread
From: brian m. carlson @ 2026-03-06 1:23 UTC (permalink / raw)
To: Ivan Ivanov; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 2044 bytes --]
On 2026-03-06 at 01:05:58, Ivan Ivanov wrote:
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
2026-03-06 1:23 ` brian m. carlson
@ 2026-03-06 1:44 ` Ivan Ivanov
2026-03-06 1:59 ` brian m. carlson
0 siblings, 1 reply; 12+ messages in thread
From: Ivan Ivanov @ 2026-03-06 1:44 UTC (permalink / raw)
To: brian m. carlson, Ivan Ivanov, git
Hi there Brian! Here are my git version --build-options (taken from a
version packaged at Artix, however I assume it to have the same
options as on https://gitea.artixlinux.org/packages/git that I am
still building atm)
git version 2.53.0 cpu: x86_64 built from commit:
67ad42147a7acc2af6074753ebd03d904476118f sizeof-long: 8 sizeof-size_t:
8 shell-path: /bin/sh rust: enabled gettext: enabled libcurl: 8.18.0
OpenSSL: OpenSSL 3.6.1 27 Jan 2026 zlib-ng: 2.3.2 SHA-1: SHA1_DC
SHA-256: SHA256_BLK default-ref-format: files default-hash: sha1
As of my shell, it is a GNU bash --version 5.3.9(1)-release
(x86_64-pc-linux-gnu)
> any configuration options you're using to build?
At the moment - just "makepkg ./PKGBUILD --check --noextract
--noprepare -f" (these flags in order to get straight to the check()
stage). Btw right now I got a somewhat similar-by-appearance error at
test t5003, however if I press Enter two times then it gets further
instead of an infinite loop:
Username for 'http://127.0.0.1:5003':
Password for 'http://127.0.0.1:5003':
Here are the contents of a related .out file for this t5003 . Please
note that not so long ago I did chmod -R 755 on this
/dev/shm/git-test/ just in case, so I am not sure why this is failing
ok 81 - remote archive does not work with protocol v1
expecting success of 5003.82 'archive remote http repository':
git archive --remote="$HTTPD_URL/auth/smart/bare.git" \
--output=remote-http.zip HEAD &&
test_cmp_bin d.zip remote-http.zip
fatal: cannot exec '/dev/shm/git-test/trash
directory.t5003-archive-zip/askpass': Permission denied
fatal: cannot exec '/dev/shm/git-test/trash
directory.t5003-archive-zip/askpass': Permission denied
fatal: cannot exec '/dev/shm/git-test/trash
directory.t5003-archive-zip/askpass': Permission denied
fatal: Authentication failed for 'http://127.0.0.1:5003/auth/smart/bare.git/'
not ok 82 - archive remote http repository
#
# git archive --remote="$HTTPD_URL/auth/smart/bare.git" \
# --output=remote-http.zip HEAD &&
# test_cmp_bin d.zip remote-http.zip
#
# failed 1 among 82 test(s)
1..82
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
2026-03-06 1:44 ` Ivan Ivanov
@ 2026-03-06 1:59 ` brian m. carlson
2026-03-06 2:14 ` Ivan Ivanov
0 siblings, 1 reply; 12+ messages in thread
From: brian m. carlson @ 2026-03-06 1:59 UTC (permalink / raw)
To: Ivan Ivanov; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 3811 bytes --]
On 2026-03-06 at 01:44:48, Ivan Ivanov wrote:
> At the moment - just "makepkg ./PKGBUILD --check --noextract
> --noprepare -f" (these flags in order to get straight to the check()
> stage). Btw right now I got a somewhat similar-by-appearance error at
> test t5003, however if I press Enter two times then it gets further
> instead of an infinite loop:
I don't believe we have a `makepkg` script in Git. What I was hoping to
see was something like this snippet from Debian's `debian/rules`:
----
OPTS =NO_OPENSSL=1 prefix=/usr gitexecdir=/usr/lib/git-core \
mandir=/usr/share/man htmldir=/usr/share/doc/git/html \
INSTALLDIRS=vendor \
SANE_TOOL_PATH= INSTALL=install TAR=tar \
NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 \
NO_PERL_CPAN_FALLBACKS=1 \
PYTHON_PATH=/usr/bin/python3 \
DEFAULT_PAGER=pager DEFAULT_EDITOR=editor \
CC='$(CC)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' \
HOST_CPU='$(HOST_CPU)'
DOCS =html
DOC_OPTS =prefix=/usr htmldir=/usr/share/doc/git/html \
ASCIIDOC8=1 ASCIIDOC_NO_ROFF=1
# https://wiki.debian.org/ReproducibleBuilds/TimestampsInDocumentationGeneratedByAsciidoc
DOC_OPTS += ASCIIDOC='TZ=UTC asciidoc'
ifeq (,$(findstring terse,$(DEB_BUILD_OPTIONS)))
OPTS += V=1
DOC_OPTS += V=1
TEST_OPTS = --verbose
endif
ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
TEST =
endif
ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
DOCS =
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
# Setting this with a pattern-specific rule prevents -O from
# affecting the top-level make, which would break realtime build
# output (unless dh is run as +dh, which causes other problems).
%: MAKEFLAGS += -O
endif
ifneq (,$(shell dpkg-query -f '$${Version}' -W libpcre2-dev))
OPTS += USE_LIBPCRE2=1
else
OPTS += USE_LIBPCRE1=1
endif
----
Those options tell us how your package is configured and what Makefile
options you're using.
> Username for 'http://127.0.0.1:5003':
> Password for 'http://127.0.0.1:5003':
>
> Here are the contents of a related .out file for this t5003 . Please
> note that not so long ago I did chmod -R 755 on this
> /dev/shm/git-test/ just in case, so I am not sure why this is failing
>
> ok 81 - remote archive does not work with protocol v1
> expecting success of 5003.82 'archive remote http repository':
> git archive --remote="$HTTPD_URL/auth/smart/bare.git" \
> --output=remote-http.zip HEAD &&
> test_cmp_bin d.zip remote-http.zip
>
> fatal: cannot exec '/dev/shm/git-test/trash
> directory.t5003-archive-zip/askpass': Permission denied
>
> fatal: cannot exec '/dev/shm/git-test/trash
> directory.t5003-archive-zip/askpass': Permission denied
> fatal: cannot exec '/dev/shm/git-test/trash
> directory.t5003-archive-zip/askpass': Permission denied
> fatal: Authentication failed for 'http://127.0.0.1:5003/auth/smart/bare.git/'
I think this is your problem. First of all, `/dev/shm` is not a
general-purpose temporary directory and should not be used that way.
It's designed for shared-memory segments that live in the file system
(usually POSIX shared-memory segments).
My guess is that you've specified `TEST_OUTPUT_DIRECTORY` to something
under `/dev/shm` and on your system that file system is marked `noexec`.
Git's testsuite uses many shell scripts and the test directory will need
to live on a fully functional file system according to the standards of
the OS. Normally people run the tests under `t` in the repository root
and the repository effectively cannot be `noexec`, since otherwise
the binaries would not work.
--
brian m. carlson (they/them)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
2026-03-06 1:59 ` brian m. carlson
@ 2026-03-06 2:14 ` Ivan Ivanov
2026-03-06 2:19 ` Ivan Ivanov
2026-03-06 4:38 ` Jeff King
0 siblings, 2 replies; 12+ messages in thread
From: Ivan Ivanov @ 2026-03-06 2:14 UTC (permalink / raw)
To: brian m. carlson, Ivan Ivanov, git
Brian, thank you very much for checking my logs: indeed, unfortunately
my system is Arch-based so we can't compare it directly with
Debian/rules. Thank you for an idea about /dev/shm , although I would
like to clarify that while it *might* be what is failing this
particular test - the causes of failure at .out files are different as
we could see by the prior 0300/0301/0302 and some future tests (could
share more logs if needed). But the external appearance of these
errors (Username/Password prompts) is similar to a user and that may
indicate some common pattern between the problems, i.e. maybe there is
some extra shell precaution needed on some systems (although I'm a bit
puzzled why my distro's packager seemingly didn't have such an issue).
I am still trying to build with skipping as few tests as possible, at
the moment I have to skip the following: t0300 t0301 t0302 t5003 t5411
t5540 t5541 t5550 t5551 t5559 t5563 t5564 (adding them to
GIT_SKIP_TESTS one-by-one, maybe there'd be more)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
2026-03-06 2:14 ` Ivan Ivanov
@ 2026-03-06 2:19 ` Ivan Ivanov
2026-03-06 4:38 ` Jeff King
1 sibling, 0 replies; 12+ messages in thread
From: Ivan Ivanov @ 2026-03-06 2:19 UTC (permalink / raw)
To: brian m. carlson, Ivan Ivanov, git
I.e. test 5564 "t5564-http-proxy.out" output may be interesting:
(during that I got asked "Password for
'http://proxuser@127.0.0.1:5564" on a prompt, after pressing enter the
tests continued to the next ones)
not ok 5 - clone can prompt for proxy password
#
# test_when_finished "rm -rf clone" &&
# test_config_global http.proxy http://proxuser@$HTTPD_DEST &&
# set_askpass nobody proxpass &&
# GIT_TRACE_CURL=$PWD/trace git clone $HTTPD_URL/smart/repo.git clone &&
# expect_askpass pass proxuser
#
checking prerequisite: SOCKS_PROXY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir-SOCKS_PROXY" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir-SOCKS_PROXY" &&
test_have_prereq PERL &&
start_socks "$TRASH_DIRECTORY/%30.sock"
)
prerequisite SOCKS_PROXY ok
expecting success of 5564.6 'clone via Unix socket':
test_when_finished "rm -rf clone" &&
test_config_global http.proxy "socks4://localhost$PWD/%2530.sock" && {
{
GIT_TRACE_CURL=$PWD/trace \
GIT_TRACE_CURL_COMPONENTS=socks \
git clone "$HTTPD_URL/smart/repo.git" clone 2>err &&
grep -i "SOCKS4 request granted" trace
} ||
old_libcurl_error err
}
== Info: [SOCKS] SOCKS4 request granted.
On Fri, Mar 6, 2026 at 5:14 AM Ivan Ivanov <qmastery16@gmail.com> wrote:
>
> Brian, thank you very much for checking my logs: indeed, unfortunately
> my system is Arch-based so we can't compare it directly with
> Debian/rules. Thank you for an idea about /dev/shm , although I would
> like to clarify that while it *might* be what is failing this
> particular test - the causes of failure at .out files are different as
> we could see by the prior 0300/0301/0302 and some future tests (could
> share more logs if needed). But the external appearance of these
> errors (Username/Password prompts) is similar to a user and that may
> indicate some common pattern between the problems, i.e. maybe there is
> some extra shell precaution needed on some systems (although I'm a bit
> puzzled why my distro's packager seemingly didn't have such an issue).
> I am still trying to build with skipping as few tests as possible, at
> the moment I have to skip the following: t0300 t0301 t0302 t5003 t5411
> t5540 t5541 t5550 t5551 t5559 t5563 t5564 (adding them to
> GIT_SKIP_TESTS one-by-one, maybe there'd be more)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
2026-03-06 2:14 ` Ivan Ivanov
2026-03-06 2:19 ` Ivan Ivanov
@ 2026-03-06 4:38 ` Jeff King
2026-03-06 14:14 ` Ivan Ivanov
1 sibling, 1 reply; 12+ messages in thread
From: Jeff King @ 2026-03-06 4:38 UTC (permalink / raw)
To: Ivan Ivanov; +Cc: brian m. carlson, git
On Fri, Mar 06, 2026 at 05:14:12AM +0300, Ivan Ivanov wrote:
> Brian, thank you very much for checking my logs: indeed, unfortunately
> my system is Arch-based so we can't compare it directly with
> Debian/rules. Thank you for an idea about /dev/shm , although I would
> like to clarify that while it *might* be what is failing this
> particular test - the causes of failure at .out files are different as
> we could see by the prior 0300/0301/0302 and some future tests (could
> share more logs if needed). But the external appearance of these
> errors (Username/Password prompts) is similar to a user and that may
> indicate some common pattern between the problems, i.e. maybe there is
> some extra shell precaution needed on some systems (although I'm a bit
> puzzled why my distro's packager seemingly didn't have such an issue).
The inability to exec scripts in the test directory is the cause of all
of the username/password prompts. What's supposed to happen is:
1. The test script creates a script called "askpass" in the temporary
test directory, and sets its executable bit. That script just
returns a dummy response on its stdout.
2. It then sets the GIT_ASKPASS variable to point to that askpass
script.
3. When Git needs a username/password, it tries (and this is in the
git_prompt() function prompt.c):
a. It runs the askpass program specified by $GIT_ASKPASS.
b. If that doesn't return a password, it prompts on the terminal
using either getpass() or by opening /dev/tty directly
(depending on your platform).
Since we've set $GIT_ASKPASS, we expect it to stop at 3a, returning that
value.
But on your system, running askpass doesn't work (I agree with brian's
guess that it is probably because /dev/shm is mounted with noexec). And
so we jump to 3b, prompting on the terminal. If you just hit enter, then
it will not get the expected value; while it may keep running, it's not
going to work. If you manually typed the same response there that
askpass would have provided, the test would probably succeed.
But of course that's silly. The right solution is to use a temporary
directory that allows execution of scripts. And I would expect there to
be a ton of other test failures, too, as many of the tests write helper
scripts and such.
The culprit is the use of --root=/dev/shm here in the package config:
https://gitlab.archlinux.org/archlinux/packaging/packages/git/-/blob/main/PKGBUILD?ref_type=heads#L71
It's reasonable to point it at a RAM disk (Git's test suite does a lot
of file I/O that gets thrown away, so running on a RAM disk can be much
faster). But it has to be a fully capable filesystem, not one mounted
with noexec. You might want to alert the package maintainer.
-Peff
PS There's one other related tidbit I noticed. These days we have a
$GIT_TERMINAL_PROMPT variable that tells Git not to access the
terminal at all. If that were set to "0" then the broken tests would
not prompt you at all. They'd still be _broken_, because askpass
would not give the result they expected, but at least they wouldn't
spam your terminal with prompts.
It might be worth putting GIT_TERMINAL_PROMPT=0 in test-lib.sh, just
to prevent accidental breakage from becoming too annoying. We didn't
do it when t0300 and friends were written because GIT_TERMINAL_PROMPT
didn't exist back then.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
2026-03-06 4:38 ` Jeff King
@ 2026-03-06 14:14 ` Ivan Ivanov
2026-03-06 16:01 ` Jeff King
0 siblings, 1 reply; 12+ messages in thread
From: Ivan Ivanov @ 2026-03-06 14:14 UTC (permalink / raw)
To: Jeff King, brian m. carlson, git
Friends, thank you so much for your kind help! Indeed: it turned out
that if /dev/shm is mounted with noexec then "--root=/dev/shm" is
failing. If you would like to ensure that the git tests are succeeding
regardless of what are the mount flags on some system or what some
distro's packagers are doing (more portability), maybe it is possible
to modify the git test system - to make it so that "askpass" always
gets launched from a native original directory, instead of being
copied to some "root" place where it could fail?
By the way I have completed a git packaging build: just these 12
mentioned tests are failing, everything else is fine. So for me atm
the possible workarounds are either GIT_SKIP_TESTS='t0300 t0301 t0302
t5003 t5411 t5540 t5541 t5550 t5551 t5559 t5563 t5564', or "mkdir -p
/tmp/git-test" then GIT_TEST_OPTS="--root=/tmp/git-test --verbose-log"
instead of a /dev/shm/git-test
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
2026-03-06 14:14 ` Ivan Ivanov
@ 2026-03-06 16:01 ` Jeff King
2026-03-06 17:36 ` Ivan Ivanov
0 siblings, 1 reply; 12+ messages in thread
From: Jeff King @ 2026-03-06 16:01 UTC (permalink / raw)
To: Ivan Ivanov; +Cc: brian m. carlson, git
On Fri, Mar 06, 2026 at 05:14:45PM +0300, Ivan Ivanov wrote:
> Friends, thank you so much for your kind help! Indeed: it turned out
> that if /dev/shm is mounted with noexec then "--root=/dev/shm" is
> failing. If you would like to ensure that the git tests are succeeding
> regardless of what are the mount flags on some system or what some
> distro's packagers are doing (more portability), maybe it is possible
> to modify the git test system - to make it so that "askpass" always
> gets launched from a native original directory, instead of being
> copied to some "root" place where it could fail?
it would be possible to do that, but introduce a lot of complexity.
Right now test scripts are given a single temporary scratch directory
with a repo to do whatever they want with. If we gave each one _two_
directories, one for putting executable things and one for repo
operations, then the latter could be on a noexec filesystem.
But why do we want to support pointing --root to a noexec filesystem in
the first place? I think this falls into "if it hurts, don't do it".
-Peff
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
2026-03-06 16:01 ` Jeff King
@ 2026-03-06 17:36 ` Ivan Ivanov
2026-03-06 21:17 ` brian m. carlson
0 siblings, 1 reply; 12+ messages in thread
From: Ivan Ivanov @ 2026-03-06 17:36 UTC (permalink / raw)
To: Jeff King; +Cc: brian m. carlson, git
Sounds reasonable, but - if there is only an issue with askpass and
everything else is fine, couldn't we just execute askpass from its
origin - instead of copying it to the destination ./git-test/
directory?
On Fri, Mar 6, 2026 at 7:01 PM Jeff King <peff@peff.net> wrote:
>
> On Fri, Mar 06, 2026 at 05:14:45PM +0300, Ivan Ivanov wrote:
>
> > Friends, thank you so much for your kind help! Indeed: it turned out
> > that if /dev/shm is mounted with noexec then "--root=/dev/shm" is
> > failing. If you would like to ensure that the git tests are succeeding
> > regardless of what are the mount flags on some system or what some
> > distro's packagers are doing (more portability), maybe it is possible
> > to modify the git test system - to make it so that "askpass" always
> > gets launched from a native original directory, instead of being
> > copied to some "root" place where it could fail?
>
> it would be possible to do that, but introduce a lot of complexity.
> Right now test scripts are given a single temporary scratch directory
> with a repo to do whatever they want with. If we gave each one _two_
> directories, one for putting executable things and one for repo
> operations, then the latter could be on a noexec filesystem.
>
> But why do we want to support pointing --root to a noexec filesystem in
> the first place? I think this falls into "if it hurts, don't do it".
>
> -Peff
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop
2026-03-06 17:36 ` Ivan Ivanov
@ 2026-03-06 21:17 ` brian m. carlson
0 siblings, 0 replies; 12+ messages in thread
From: brian m. carlson @ 2026-03-06 21:17 UTC (permalink / raw)
To: Ivan Ivanov; +Cc: Jeff King, git
[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]
On 2026-03-06 at 17:36:35, Ivan Ivanov wrote:
> Sounds reasonable, but - if there is only an issue with askpass and
> everything else is fine, couldn't we just execute askpass from its
> origin - instead of copying it to the destination ./git-test/
> directory?
We actually do generate and run quite a few scripts in the testsuite
(`git grep write_script`). All of these will be generated in the trash
directory we create for each test and some of them contain dynamic
components that cannot be generated before the testsuite is run.
It may be, for whatever reason, that only those tests happen to
malfunction in this case, but we're not willing to do the testing and
maintenance required to guarantee that the testsuite works in a noexec
environment. There are some cases where we accept patches to deal with
uncommon cases (for instance, I send in patches to fix the testsuite
with zsh in sh mode from time to time), but I think this is a case where
we fully expect things to be very broken (at least I do) and the amount
of effort required to fix it would be substantial.
I am sympathetic to the downsides of noexec temporary directories
because I've worked on systems where `/tmp` was noexec, but we assume
that most people on Unix systems have at least a home directory where
they can execute things (if for no other reason than the customary
`~/bin` directory).
--
brian m. carlson (they/them)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-03-06 21:17 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 0:42 Test "t0300-credentials" is failing on Arch/Artix: asks to enter the Username/Password in an infinite loop Ivan Ivanov
2026-03-06 1:05 ` Ivan Ivanov
2026-03-06 1:23 ` brian m. carlson
2026-03-06 1:44 ` Ivan Ivanov
2026-03-06 1:59 ` brian m. carlson
2026-03-06 2:14 ` Ivan Ivanov
2026-03-06 2:19 ` Ivan Ivanov
2026-03-06 4:38 ` Jeff King
2026-03-06 14:14 ` Ivan Ivanov
2026-03-06 16:01 ` Jeff King
2026-03-06 17:36 ` Ivan Ivanov
2026-03-06 21:17 ` brian m. carlson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox