fix: support SSH callback ports in init#230
Merged
Merged
Conversation
Share browser OAuth option registration, callback-port validation, and SSH forwarding guidance between init and login. Add command, flow, smoke, and documentation coverage for remote browser authentication.
skvark
marked this pull request as ready for review
July 23, 2026 11:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
initandlogininit --no-browser --port <port>to select a deterministic loopback callback for SSH forwardingRoot cause
--no-browseronly controls whether GitHits launches a browser. The OAuth callback server still listens on the loopback interface of the machine running the CLI. A browser on another computer therefore needs an SSH local forward, andinitpreviously had no way to select the callback port before the flow started.Implementation
Browser-launch and callback-port option registration, parsing, validation, typing, and instruction formatting are centralized in one module. Both commands use those options and continue through the existing shared
loginFlow;initdoes not implement a separate authentication path.This is an independent maintainer implementation of the behavior described in #229. No commits from the contributor branch were incorporated.
Validation
bun test— 2,502 passedbun run typecheckbun run buildbun run lintThe default source CLI and MCP smoke suites passed their unauthenticated phases, then their authenticated live probes were rate-limited by the service (HTTP 429).