Skip to content

[build-tools] Disable the git credential helper for the credentialed project repository fetches - #4841

Draft
sswrk wants to merge 1 commit into
mainfrom
szymonswierk/disable-git-credential-helper-for-credentialed-fetches
Draft

sswrk wants to merge 1 commit into
mainfrom
szymonswierk/disable-git-credential-helper-for-credentialed-fetches

Conversation

@sswrk

@sswrk sswrk commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Why

Follow-up to the review comment: #4826 (review)

On macOS the git credential helper can keep the repository access even after stripping the token from the origin URL used for repo cloning. If a credential helper such as osxkeychain is configured, git can store that token in the system keychain. This is not happening currently, becuase keychain access is disabled for the worker process.

This PR hardens the clone to not attempt saving anything in the system keychain.

How

Both credentialed fetches in packages/build-tools/src/common/git.ts now run with -c credential.helper=. This way git does not hand the token to any helper to store.

Test Plan

@sswrk
sswrk force-pushed the szymonswierk/disable-git-credential-helper-for-credentialed-fetches branch from c9e2d96 to 481b35b Compare November 9, 2026 14:17
@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.11%. Comparing base (ccba9a0) to head (0bca8ff).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4841      +/-   ##
==========================================
+ Coverage   77.09%   77.11%   +0.02%     
==========================================
  Files        1118     1118              
  Lines       56722    56722              
  Branches    12585    12585              
==========================================
+ Hits        43725    43733       +8     
+ Misses      12007    12000       -7     
+ Partials      990      989       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sswrk
sswrk force-pushed the szymonswierk/disable-git-credential-helper-for-credentialed-fetches branch from 481b35b to 0bca8ff Compare November 9, 2026 15:02
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

✅ Thank you for adding a changeset!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant