git fetch hangs on password prompt

10 views
Skip to first unread message

Jörg Sommer

unread,
Jan 26, 2026, 6:31:45 AMJan 26
to kas-...@googlegroups.com
Hi,

when I use this config:

```
header:
version: 11

repos:
bitbake:
url: "g...@github.com:siemens/kas.git"
branch: main
path: "kas"
```

and run

```
% ./kas-container -l debug checkout private.yaml
+ docker run -v /tmp/tmp.Cnb1XH7rUV:/repo:ro -v /tmp/tmp.Cnb1XH7rUV:/work:rw -e KAS_WORK_DIR=/work --workdir=/repo -e KAS_CONTAINER_SCRIPT_VERSION=5.1 -e USER_ID=1001 -e GROUP_ID=1001 --rm --init -t -i -e KAS_HOST_TZ=Europe/Berlin -e TERM=screen -e TZ=:Europe/Berlin -e SHELL=/bin/bash --log-driver=none --user=root --security-opt apparmor=rootlesskit -v /home/sommer/.cache/yocto-dl-cache:/downloads:rw -e DL_DIR=/downloads -v /home/sommer/.cache/yocto-sstate:/sstate:rw -e SSTATE_DIR=/sstate ghcr.io/siemens/kas/kas:5.1 -l debug checkout /repo/private.yaml
2026-01-26 12:21:11 - INFO - kas 5.1 started on Debian GNU/Linux 13
2026-01-26 12:21:11 - DEBUG - Using selector: EpollSelector
2026-01-26 12:21:11 - DEBUG - execute setup_dir
2026-01-26 12:21:11 - DEBUG - execute setup_home
2026-01-26 12:21:11 - DEBUG - execute init_setup_repos
2026-01-26 12:21:11 - DEBUG - /repo$ git rev-parse --show-toplevel --show-superproject-working-tree
2026-01-26 12:21:11 - DEBUG - /repo$ hg root
2026-01-26 12:21:11 - DEBUG - /repo$ git rev-parse --show-toplevel --show-superproject-working-tree
2026-01-26 12:21:11 - DEBUG - /repo$ hg root
2026-01-26 12:21:11 - DEBUG - config file /repo/private.yaml (internal)
2026-01-26 12:21:11 - DEBUG - execute repo_setup_loop
2026-01-26 12:21:11 - DEBUG - Loop repo_setup_loop: execute setup_repos_step
2026-01-26 12:21:11 - DEBUG - execute finish_setup_repos
2026-01-26 12:21:11 - DEBUG - /work/kas$ git remote set-url origin g...@github.com:siemens/kas.git
2026-01-26 12:21:11 - DEBUG - /work/kas$ git cat-file -t main
2026-01-26 12:21:11 - DEBUG - /work/kas$ git fetch -q
```

the fetch blocks and in another terminal I can see with ps that git is
suspended.

```
1833066 00:05 10 root 40892 10724 Sl ? 00:00:00 /usr/bin/containerd-shim-runc-v2 -namespace moby -id 5d41d5c10c78cc7d361ca8d895d74952be85327f75da2c00041a5798809fe160 -address /run/containerd/containerd.sock
1833090 00:05 1 root 304 788 Ss pts/0 00:00:00 \_ /sbin/docker-init -- /container-entrypoint -l debug checkout
1833123 00:05 1 sommer 26756 38288 S+ pts/0 00:00:00 \_ /usr/bin/python3 /usr/local/bin/kas -l debug checkout
1833180 00:04 1 sommer 596 5348 T pts/0 00:00:00 \_ git fetch -q
1833181 00:04 1 sommer 880 9072 T pts/0 00:00:00 \_ /usr/bin/ssh -o SendEnv=GIT_PROTOCOL g...@github.com git-upload-pack 'siemens/kas.git'
```

Maybe kas should set GIT_TERMINAL_PROMPT = '0' to prevent git from doing any
prompts.

On another project, I have multiple repos with authentication via https and
I get:

```
Username for 'https://git.local': Username for 'https://git.local': Username for 'https://git.local': Username for 'https://git.local':
```

and it hangs.


Regards Jörg

--
Navimatix GmbH T: 03641 - 327 99 0
Tatzendpromenade 2 F: 03641 - 526 306
07745 Jena www.navimatix.de

Geschäftsführer: Steffen Späthe, Jan Rommeley
Registergericht: Amtsgericht Jena, HRB 501480

Jan Kiszka

unread,
Jan 27, 2026, 12:57:41 AM (14 days ago) Jan 27
to Jörg Sommer, kas-...@googlegroups.com
Valid point, patch welcome.

Interestingly, I fails for me locally (kas, no kas-container) but avoids
to tell me more about (your other bug report...):

2026-01-27 06:55:19 - DEBUG - /dev/shm/testing/kas$ git fetch -q
2026-01-27 06:55:20 - ERROR - Could not update repository bitbake:
2026-01-27 06:55:20 - ERROR - Fetching of repo: "bitbake" failed:

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

Jan Kiszka

unread,
Jan 28, 2026, 4:26:43 AM (13 days ago) Jan 28
to Jörg Sommer, kas-...@googlegroups.com
On 26.01.26 12:31, 'Jörg Sommer' via kas-devel wrote:
Setting GIT_TERMINAL_PROMPT indeed helps with http access attempts
(patch will follow), but it does not help with the case when ssh is
prompting to confirm the host key. We have that disabled but only if SSH
is passed into the kas environment or if the passed config folder
(kas-container) is doing that.

MOESSBAUER, Felix

unread,
Jan 28, 2026, 4:52:06 AM (13 days ago) Jan 28
to joerg....@navimatix.de, Kiszka, Jan, kas-...@googlegroups.com
There are more cases where git hangs (e.g. broken network, invalid
proxies, super-slow fetching). Debugging this is tricky. I'm wondering
if we should just run git in foreground when running kas in (-l debug)
mode.

Felix

>
> Jan
>
> --
> Siemens AG, Foundational Technologies
> Linux Expert Center
>
> --
> You received this message because you are subscribed to the Google Groups "kas-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kas-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/kas-devel/185095ee-50d9-444a-9b58-9d53221e807b%40siemens.com.

--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany

Jan Kiszka

unread,
Jan 28, 2026, 5:14:05 AM (13 days ago) Jan 28
to Moessbauer, Felix (FT RPD CED OES-DE), joerg....@navimatix.de, kas-...@googlegroups.com
One measure does not rule out the other.

Jörg Sommer

unread,
Jan 28, 2026, 5:46:04 AM (12 days ago) Jan 28
to Jan Kiszka, kas-...@googlegroups.com
Jan Kiszka schrieb am Mi 28. Jan, 10:26 (+0100):
Maybe it helps to start git (all subprocesses?) with stdin=/dev/null?

Setting GIT_TERMINAL_PROMPT=0 in case of stdin is /dev/null is still useful,
because git prints otherwise confusing messages like "could not read
Username for '...': No such device or address".
Reply all
Reply to author
Forward
0 new messages