fix: use x-access-token form for GitHub App token git push#3659
Open
ramsessanchez wants to merge 1 commit into
Open
fix: use x-access-token form for GitHub App token git push#3659ramsessanchez wants to merge 1 commit into
ramsessanchez wants to merge 1 commit into
Conversation
GitHub App installation tokens must authenticate as the password with username "x-access-token" (https://x-access-token:<token>@github.com/...). The bare https://<token>@github.com/... form only works for PATs, so once the PAT was removed from ADO the weekly pushes failed with "could not read Password ... terminal prompts disabled". Updates all five pipeline push URLs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b1e4dbfd-ffcd-4a3e-bd35-1632b2912252
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
Fixes the weekly generation pipelines failing to
git pushafter the PAT was removed from ADO, following the move to GitHub App auth (#3657).Root cause
GitHub App installation tokens must authenticate as the password with the username
x-access-token:The previous form —
https://<token>@github.com/...— puts the token in the username position with no password. That works for a PAT (which is why pushes succeeded while the PAT still existed in ADO), but an installation token in that position is rejected, so git falls back to prompting for a password and fails non-interactively:Fix
Prefixed all five pipeline push URLs with
x-access-token::common-templates/create-pr.ymlcommon-templates/download-openapi-docs.ymlgeneration-templates/generate-command-metadata.ymlweekly-examples-update.ymlcommand-metadata-refresh.ymlThe
x-access-token:<token>form is also valid for PATs, so this is backward compatible.gh pr createwas unaffected (it usesGITHUB_TOKENvia the REST API, not a git URL).Note: This pull request was created with assistance from GitHub Copilot.