Skip to content

fix(compute): strip the .git suffix before GitHub REST API lookups - #106

Merged
jplock merged 1 commit into
mainfrom
fix/105-git-suffix-mint
Jul 20, 2026
Merged

fix(compute): strip the .git suffix before GitHub REST API lookups#106
jplock merged 1 commit into
mainfrom
fix/105-git-suffix-mint

Conversation

@jplock

@jplock jplock commented Jul 20, 2026

Copy link
Copy Markdown
Member

The git reverse proxy forwards the raw repo path segment into Minter::mint, but the GitHub REST API rejects git's repo.git remote spelling, so any fetch/push from a standard clone — including the snapshot-seeded /workspace repos — failed with a 500 (GitHub installation lookup for smoketurner/devbox.git failed (404)).

mint now normalizes the repo name with a bare_repo helper shared with parse_remote (which already stripped the suffix for remote-URL callers). The smart-HTTP upstream URL keeps the client's spelling, which GitHub accepts.

Server-side only — deploys with the service, no agent release or AMI rebuild needed.

Fixes #105

🤖 Generated with Claude Code


Note

Low Risk
Small, localized change to repo name normalization before existing GitHub API calls; no auth model or proxy URL behavior changes beyond fixing the 404 case.

Overview
Fixes GitHub App token minting when the git reverse proxy passes repository path segments that still include the .git suffix. Minter::mint now normalizes the repo name with a shared bare_repo helper before installation lookup and token exchange, so REST calls use owner/repo instead of owner/repo.git (which GitHub rejects with 404).

parse_remote uses the same helper instead of inline suffix stripping, keeping remote-URL and proxy callers consistent. Unit tests cover bare_repo edge cases. Smart-HTTP upstream URLs are unchanged and can keep the client’s spelling.

Reviewed by Cursor Bugbot for commit bc215f7. Bugbot is set up for automated code reviews on this repo. Configure here.

The git reverse proxy forwards the raw repo path segment into
Minter::mint, but the REST API rejects git's repo.git remote spelling,
so any fetch/push from a standard clone (including the seeded
/workspace repos) failed with a 500. Normalize in mint, matching the
stripping parse_remote already does for remote-URL callers.

Fixes #105

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jplock
jplock merged commit c6ce3d4 into main Jul 20, 2026
9 checks passed
@jplock
jplock deleted the fix/105-git-suffix-mint branch July 20, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

git reverse proxy returns 500 for remotes with a .git suffix

1 participant