Skip to content

Opening a repo silently fails when Apple Git is blocked by Xcode license acceptance #603

Closed

Description

@johndouthat

Title

Repository opening silently fails when Apple Git is blocked by Xcode license acceptance

Description

GitX launches and displays the Open Recent window, but selecting a repository does not open its main window or display an error.

Opening a repository through File → Open reveals the underlying error:

Could not find a git binary version 1.6.0 or higher.

In this case, /usr/bin/git could not run because Xcode required license acceptance.

Environment

  • macOS: 26.6.2 (25G83)
  • Architecture: Apple Silicon
  • GitX: 1.5.6-HEAD, build 1.5.6.3222 [arm]
  • Homebrew Git: 2.54.0

Steps to reproduce

  1. Have Xcode installed with its license acceptance pending, so /usr/bin/git --version returns the license acceptance message.
  2. Have Homebrew Git installed at /opt/homebrew/bin/git, without a custom Git executable configured in GitX.
  3. Launch GitX from Finder.
  4. Select a repository in Open Recent.

Actual behavior

No repository window opens, and no error is shown through Open Recent.

GitX logs an error like "Invalid view geometry: width is negative and height is negative"

Using File → Open displays the Git executable discovery error.

Expected behavior

  • Repository-opening failures should display an actionable error from Open Recent, consistent with File → Open.
  • Ideally, GitX should distinguish an unavailable Git executable from one that fails because Xcode requires license acceptance.

Investigation and workaround

Running /usr/bin/git --version returned:

You have not agreed to the Xcode license agreements.

Running /opt/homebrew/bin/git --version succeeded:

git version 2.54.0

Explicitly configuring GitX to use /opt/homebrew/bin/git resolved the issue.

Reinstalling GitX and resetting its preferences and WebKit data did not resolve it.

Possible implementation areas

PBGitBinary.m supports the gitExecutable preference, but its fallback search locations omit /opt/homebrew/bin/git. Adding that location and surfacing repository-opening errors from Open Recent may address both discovery and the silent failure.

Activity

  1. goneng commented on Sep 12, 2026

    @goneng
    Collaborator

    @johndouthat , Thanks for the detailed report, both halves were real.

    The silent failure is the Open Recent window handing the document controller an empty
    completion-handler, which means nothing presents the error it hands back.
    I reproduced it without the Xcode license part by opening a repository and then moving
    its .git aside: selecting it in the popup opened nothing and said nothing, while the
    File menu showed "does not appear to be a git repository".
    It now shows the same alert as the File menu.

    You were also right about PBGitBinary.m:
    the search locations predate Apple Silicon and never included /opt/homebrew/bin,
    so with /usr/bin/git blocked there was nothing left to find.
    It is now searched first, and since the "could not find a git binary" message is
    built from that same list, it names it too.

    Both are in #616.

    I could not stage a /usr/bin/git that fails a licence check,
    so that half is only covered by the code and a unit test -
    if you still have the machine in that state, a build would confirm it properly:

    https://github.com/gitx/gitx/actions/runs/34714878267

    GitX-arm64.zip under Artifacts (you need to be signed in to GitHub to download).

    I left the third point, telling an unavailable git apart from one blocked by the
    license agreement, out of this change. It needs matching on Apple's message text,
    which I would rather not do quietly inside the version check.
    Happy to look at it separately if the two fixes above do not leave you in a good place.

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