fix(test): run the git-fetcher test on Windows over pinned HTTPS#198
Open
John-David Dalton (jdalton) wants to merge 1 commit into
Open
fix(test): run the git-fetcher test on Windows over pinned HTTPS#198John-David Dalton (jdalton) wants to merge 1 commit into
John-David Dalton (jdalton) wants to merge 1 commit into
Conversation
The GitHub Actions windows runner's global git config rewrites https://github.com/ to git@github.com: via insteadOf, so the auth-less git-fetcher clone resolved to SSH and failed (no runner SSH key). Rather than skip on win32, inject a longer-prefix insteadOf (full repo url mapped to itself) via GIT_CONFIG_COUNT/KEY/VALUE — git resolves insteadOf by longest match, so this out-specs the runner's rule and forces HTTPS on every platform. Verified against git 2.50: the same-length and inverse SSH->HTTPS forms do NOT win, the full-url self-map does.
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.
The git-fetcher network test was skipped on Windows because the GitHub Actions windows runner rewrites https://github.com/ to git@github.com: via a global insteadOf rule, so the auth-less clone resolved to SSH and failed with Permission denied (publickey).
Fix: inject a longer-prefix insteadOf (the full repo url mapped to itself) via git's GIT_CONFIG_COUNT/KEY/VALUE env protocol. Git resolves insteadOf by longest matching prefix, so this out-specs the runner's shorter rule and forces HTTPS on every platform, no skip.
Verified against git 2.50 that the same-length and inverse SSH-to-HTTPS forms do not win, only the full-url self-map does. Ran the un-skipped test (real git+https clone): passes.