Repository navigation
Scope the forwarded GitHub credential helper to github.com - #8055
Merged
Merged
Conversation
Reset and set credential.https://github.com.helper instead of the unscoped credential.helper, so local helpers for other hosts stay active.
alexburlis
added a commit
to alexburlis/omnyo
that referenced
this pull request
Nov 26, 2026
Record the upstream PRs, revisions, contributors, and Omnyo integration commits for merge d2a24ac in docs/upstream-credits.md. Original-PR: get-bb/bb#7663 Original-Commit: get-bb/bb@1737a03 Original-Author: rufi Original-PR: get-bb/bb#8055 Original-Commit: get-bb/bb@651ae20 Original-Author: Jake Lancaster Original-PR: get-bb/bb#8075 Original-Commit: get-bb/bb@511e1ed Original-Author: Jake Lancaster Original-Co-Author: Michael Yong Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8096 Original-Commit: get-bb/bb@775090b Original-Author: Michael Yong Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8145 Original-Commit: get-bb/bb@8de6711 Original-Commit: get-bb/bb@0d3db49 Original-Commit: get-bb/bb@92d3a76 Original-Commit: get-bb/bb@6705422 Original-Author: Michael Yong Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8171 Original-Commit: get-bb/bb@b56ed04 Original-Author: Jake Lancaster Original-PR: get-bb/bb#8238 Original-Commit: get-bb/bb@2a9a142 Original-Author: SawyerHood Original-PR: get-bb/bb#8247 Original-Commit: get-bb/bb@ba4ae22 Original-Author: Salem Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8259 Original-Commit: get-bb/bb@96f40a9 Original-Author: SawyerHood Original-PR: get-bb/bb#8263 Original-Commit: get-bb/bb@141e40a Original-Author: mk Original-PR: get-bb/bb#8266 Original-Commit: get-bb/bb@84e20e9 Original-Author: ILIA GOLUBEV
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.
Human comments
What was wrong
With machine Git credentials on,
githubGitConfiguration(apps/server/src/services/machines/git-credentials.ts) sends command-scope Git config that resets the unscopedcredential.helperlist and then adds the forwarded helper. The reset applies to every URL. On an enrolled machine it clears the local helpers for GitLab, Bitbucket and all other hosts. The forwarded helper answers onlyhttps://github.com, so HTTPS operations against other hosts have no helper and fail withfatal: could not read Username. See #8048 and the investigation report.What changed
apps/server/src/services/machines/git-credentials.ts: both helper entries usecredential.https://github.com.helper, the empty reset first and the forwarded helper second. Git applies a URL-scoped helper key only to URLs that match it, and it reads command-scope config last. Thus the reset still clears every local helper for github.com, so forwarding still wins there, and the helpers for other hosts stay active. This is the fix that the issue proposes.HOST_DAEMON_PROTOCOL_VERSIONbump. The server sends the same env entry names and the same shape (GIT_CONFIG_COUNTstays 4). Only two string values change. The daemon passes the entries to child processes and does not read them, so a daemon that has not updated applies the new values correctly.http://github.comand github.com subdomains (for examplegist.github.com) now use the machine's own helpers. Before, they had no helper.How you verified
repro.shwith git 2.56.1 gives the same output as the report: the unscoped key clears the GitLab helper, and the scoped key keeps it while github.com gets the forwarded helper.git-credentials.test.ts. It writes a gitconfig with helpers for gitlab.example, github.com and all hosts, then runs realgit credential fillwith the env thatresolveGitCredentialsreturns. Before the fix it fails (expected 128 to be +0for gitlab.example). After the fix it passes: gitlab.example and bitbucket.example use their local helpers, github.com gets the forwarded token, and no local helper runs for github.com.pnpm exec turbo run typecheck lint:type-aware test --filter=@bb/server: pass (4455 tests).Fixes #8048