Skip to content

Fatal Bug: MinGit on Busybox panics when pushing #6107

Open

Description

@emmettlu

Existing issues matching what you're seeing

  • I was not able to find an open or closed issue matching what I'm seeing

Git for Windows version

~> git version --build-options
git version 2.53.0.windows.1
cpu: x86_64
built from commit: a5512bdee37ed7142c233d21e2d347ffc4860ff3
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
rust: disabled
feature: fsmonitor--daemon
gettext: enabled
libcurl: 8.18.0
OpenSSL: OpenSSL 3.5.5 27 Jan 2026
zlib: 1.3.1
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1

Windows version

Windows 10

Windows CPU architecture

x86_64 (64-bit)

Additional Windows version information

Microsoft Windows [Version 10.0.19044.6937]

Options set during installation

I use the zip archive so no `install-options.txt` file

Other interesting things

~> git push
-c: applet not found
bash: can't create /dev/tty: nonexistent directory
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No such file or directory

Terminal/shell

nushell & cmd & pwsh all exist this issue

Commands that trigger the issue

Just simply exec:

git push



~> git push
-c: applet not found
bash: can't create /dev/tty: nonexistent directory
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No such file or directory

Expected behaviour

Success

Actual behaviour

-c: applet not found
bash: can't create /dev/tty: nonexistent directory
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No such file or directory

Repository

No response

Activity

  1. changed the title [-]Fatal Bug: MinGit for Busybox paniced when pushing[/-] [+]Fatal Bug: MinGit on `Busybox` panics when pushing[/+] on Feb 22, 2026
  2. emmettlu commented on Feb 22, 2026

    @emmettlu
    Author

    Note: No this issue for MinGit on Busybox that version 2.43 and earlier

  3. dscho commented on Feb 22, 2026

    @dscho
    Member

    @emmettlu Two notes. First of all, BusyBox based variant of MinGit is still experimental, and I'm really, really close to dropping it altogether because it's just not robust and it won't be robust ever because the BusyBox-w32 maintainer does not even accept CI builds, which reduced my confidence in that project rather dramatically.

    Second, /dev/tty looks like it's asking for username and password. How did that work before? Are you sure that nothing changed in your setup? And that the credential helper, for example, is maybe no longer configured?

  4. zcsizmadia commented on Sep 17, 2026

    @zcsizmadia

    Two separate problems are visible in the report.

    1. -c: applet not found is the same root cause as ! aliases not working in MinGit busybox builds #5184 and Git clone from local folder broken? #5469: the BusyBox-based MinGit ships no sh.exe, git_shell_path() falls back to the path of busybox.exe itself, and BusyBox reads -c as an applet name. mingit: ship BusyBox as sh.exe in the BusyBox-based MinGit build-extra#746 ships a copy of busybox.exe as mingw64/bin/sh.exe, which fixes this part. I verified it against the extracted MinGit-2.55.0.5-busybox-64-bit.zip with a PATH restricted to the Windows directories and MinGit's cmd directory.

    2. bash: can't create /dev/tty: nonexistent directory comes from the terminal prompt fallback that runs bash -c 'cat >/dev/tty && read -r line </dev/tty && echo "$line"' when Git decides it has no usable console. I can reproduce that path with 2.55.0.5 by running git ls-remote https://github.com/<private repo> with no credential helper and stdin not attached to a console. BusyBox's bash applet has no /dev/tty, so the prompt fails. That is not addressed by build-extra#746 and needs a separate look at compat/terminal.c.

  5. zcsizmadia commented on Sep 17, 2026

    @zcsizmadia

    Correction to my earlier comment: current BusyBox-w32 does support /dev/tty (mapped to the CON device, upstream commit rmyorston/busybox-w32@f53dbcb8 from 2025-11-10). The error in this report comes from the BusyBox build that MinGit shipped at the time.

    • MinGit-2.53.0-busybox still contained mingw-w64-x86_64-busybox 1.34.0.19688, built 2022-09-19. Its bash -c 'echo hi >/dev/tty' fails with can't create /dev/tty: nonexistent directory even with a console attached, which matches the trace above.
    • MinGit-2.55.0.5-busybox ships BusyBox 1.38.0 built 2026-06-27. The same command succeeds, and git credential fill with no credential helper reaches a working prompt from cmd or PowerShell.

    So the /dev/tty part of this report is resolved by the BusyBox update that went out with 2.55. The -c: applet not found part is addressed by git-for-windows/build-extra#746. @emmettlu, could you retry with 2.55.0.5 or newer? If the prompt still fails, the remaining question is why CONIN$ could not be opened in your setup, which would mean git-remote-https ran without a console.

  6. dscho commented on Sep 17, 2026

    @dscho
    Member
    1. mingit: ship BusyBox as sh.exe in the BusyBox-based MinGit build-extra#746 ships a copy of busybox.exe as mingw64/bin/sh.exe

    That would increase the size of the .zip file substantially, something I'm not willing to do. MinGit is intended to be bundled with 3rd-party applications, hence the size is the real motivator for MinGit itself, and increasing its size isn't something we're going to do without really good reasons.

    2. BusyBox's bash applet has no /dev/tty, so the prompt fails. That is not addressed by build-extra#746 and needs a separate look at compat/terminal.c.

    Seeing as /dev/tty is required for interactive input, something MinGit distinctly does not support in its goal of reducing the size, I see this as a report in search of a bug.

    Seriously, I do understand that people want to use MinGit interactively. They like the small size. But it's actually not meant for them. And trying to burden me with supporting a use case that I have specifically excluded from MinGit isn't something I find particularly kind; I am already an overworked open source maintainer, why add to that burden (who does something like that)?

    So the /dev/tty part of this report is resolved by the BusyBox update that went out with 2.55

    Great, so now, by Hyrum's Law I'm stuck with keeping MinGit usable as an interactive component? No. I decline. Absolutely not. If it happens to work for you right now, fine. But don't expect this to work forever. If you want to use Git for Windows interactively, use the Portable Git version, or fix problems you encounter with MinGit on your side, but don't open issues about interactive MinGit usage in this here bug tracker. Reading all this was the opposite of how I wanted to start my day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions