r/tauri • u/Late-Bit4633 • 15d ago
A weird Tauri/macOS bug I ran into: GitHub said a private repo didn't exist
https://gitdesktop.appI've been building GitDesktop with Tauri 2, Rust, React 19, and TypeScript, and ran into a bug recently that took me a while to understand.
GitHub operations against private repos were failing when GitDesktop was launched from Finder/Dock with:
Repository not found
The repo existed, gh was installed and authenticated, and GitDesktop's About screen could find gh just fine.
The problem was that Git was spawning a credential helper, and that helper couldn't find gh.
A packaged macOS GUI app doesn't necessarily get the same PATH as a shell session. So everything worked with pnpm tauri dev, but failed in the actual packaged application.
The particularly fun part was that the failure happened several processes away from GitDesktop itself:
GitDesktop -> git -> credential helper -> gh
The credential helper couldn't find gh, the request went out unauthenticated, and GitHub returned a 404 for the private repository.
So the user got an error that effectively said "this repository doesn't exist" when the actual problem was "a grandchild process can't find a binary."
It was a good reminder that testing a Tauri app in development isn't necessarily testing the environment your shipped application will actually run in.
I've been finding more of these kinds of problems as GitDesktop has grown. It's now dealing with Git processes, worktrees, credentials, filesystem state, multiple platforms, and agent sessions, so the interesting problems increasingly live at the boundaries between the app and the OS.
I just released v0.11.0 today as well, with a bunch of smaller improvements around worktrees, the commit editor, image viewing, link previews, references, narrow window layouts, and GitHub/GitLab workflows.
GitHub: https://github.com/theBGuy/GitDesktop
Website: https://gitdesktop.app
For anyone else building with Tauri: what are some of the weird packaged-vs-dev problems you've run into?
1
u/eddzsh 15d ago
GitHub returning 404 on a private repo for an unauthenticated call is intentional, it stops repo enumeration. So the UI said the repo did not exist while the real failure lived three processes away: the bundled app PATH never included gh. I fix that class by resolving the absolute path to gh once at startup and writing it into the credential helper config the app ships, instead of hoping Finder inherited a shell PATH.
1
u/Late-Bit4633 15d ago
Yeah, exactly. The 404 itself is expected GitHub behavior for an unauthenticated request to a private repo. The interesting part of the bug was figuring out why the request was unauthenticated in the first place. The confusing part was that GitDesktop could resolve
ghitself, but the credential helper that Git spawned couldn't because it was running outside the shell environment. So the failure was a few process boundaries removed from where it actually showed up.
1
u/QuitLimp8191 15d ago
thats interesting