Skip to content

git path warning dialog on startup #744

Closed

Description

@joachim-n

My mac is set to reopen all applications on startup, and sometimes when I turn it on I get this warning dialog from Gitx:

The path „/usr/bin/git“, which is configured as a custom git path in the preferences window, is not a valid git v1.6.0 or higher binary. Using the default search paths instead.

Running /usr/bin/git --version in a terminal shows that it is:

git version 2.50.1 (Apple Git-155)

Activity

  1. goneng commented on Oct 3, 2026

    @goneng
    Collaborator

    Thanks for the report. A draft fix is up in #748: the configured git path is now validated in the background, and the failure reason is logged. The cause is not confirmed yet (likely the /usr/bin/git shim failing early in login), so if it still happens with that build, the Console output around the alert would help.

  2. self-assigned this
    on Oct 3, 2026
  3. added a commit that references this issue on Oct 3, 2026
    43f6ab3
  4. goneng commented on Oct 3, 2026

    @goneng
    Collaborator

    The fix is now on master (#748). A build that includes it is attached to this CI run, under Artifacts (GitX-arm64.dmg or GitX-x86_64.dmg): https://github.com/gitx/gitx/actions/runs/37114084634

    If the alert still shows up at login with that build, the Console output around it would help narrow down the cause.

  5. joachim-n commented on Oct 10, 2026

    @joachim-n
    Author

    I got this again with release Version 1.7.1 (1.7.1.3490 [arm]).

  6. reopened this on Oct 10, 2026
  7. goneng commented on Oct 10, 2026

    @goneng
    Collaborator

    Thanks for the update, and sorry it is still happening. I reopened this issue.

    The previous change moved the check off the startup path and
    added logging of why it fails, so the Console should now say which step fails.
    Could you please send the GitX lines from the Console right after the alert shows up?
    In Console.app, select your Mac, search for GitX and look around the time of the alert for lines such as:

    • Running '/usr/bin/git --version' failed: ...
    • Could not parse the output of '/usr/bin/git --version': ...
    • The configured git path ... failed validation ...

    Also, a few questions that would help us reproduce it:

    • Does GitX reopen several repository windows at login in your case?
    • Do you have Xcode.app installed, or only the Command Line Tools?
    • Is the alert shown on every login or only sometimes?

    One theory we want to check is that many apps (and several GitX repositories)
    start at once after login, and git --version is slow to answer.
    The check currently gives up after 30 seconds, and there is no retry, so
    we will look into how startup behaves in that situation.

  8. goneng commented on Oct 24, 2026

    @goneng
    Collaborator

    Update: I think I reproduced the cause of this, and it is not the git path itself.

    When many GitX instances start at once (I opened about a dozen repositories together on a test build of #766),
    git --version sometimes comes back with an empty output even though it ran fine.
    The log shows:
    Could not parse the output of '/opt/homebrew/bin/git --version':
    with nothing after the colon, for /opt/homebrew/bin/git and /usr/bin/git alike.
    When every candidate returns nothing, GitX concludes that no valid git exists, which
    gives the "Invalid git path" alert (or a repository that fails to open).

    The cause is a race in PBTask:
    The process can exit before its output has been read from the pipe, and the output is then dropped.
    It affects any command run through PBTask, not just --version.

    Fix:
    #774 (draft), which waits for the output to be fully read before a command is reported as finished.
    Together with #766 (validation off the main thread, and a fallback if the configured path fails),
    this should cover the scenario here.

    @joachim-n: if you still see this, the Console lines for process GitX would confirm it.
    Look for Could not parse the output of ... --version: followed by an empty output.
    Does it tend to happen when several repositories open at the same login,
    for example via "reopen windows"?

  9. goneng commented on Oct 25, 2026

    @goneng
    Collaborator

    @joachim-n: the fix for this is now in release 1.8.

    It combines two changes:

    I'm closing this for now. If you update to 1.8 and still see the "Invalid git path" alert at login, please reopen this issue and attach the Console lines for process GitX that mention git. They will tell us which step failed.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions