Skip to content

fix(test): run the git-fetcher test on Windows over pinned HTTPS#198

Open
John-David Dalton (jdalton) wants to merge 1 commit into
mainfrom
land/win-skip
Open

fix(test): run the git-fetcher test on Windows over pinned HTTPS#198
John-David Dalton (jdalton) wants to merge 1 commit into
mainfrom
land/win-skip

Conversation

@jdalton

Copy link
Copy Markdown
Collaborator

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.

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.
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