Skip to content

fix: use x-access-token form for GitHub App token git push#3659

Open
ramsessanchez wants to merge 1 commit into
mainfrom
fix/github-app-token-push-url
Open

fix: use x-access-token form for GitHub App token git push#3659
ramsessanchez wants to merge 1 commit into
mainfrom
fix/github-app-token-push-url

Conversation

@ramsessanchez

Copy link
Copy Markdown
Contributor

Summary

Fixes the weekly generation pipelines failing to git push after 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:

https://x-access-token:<token>@github.com/owner/repo.git

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:

The value of the GITHUB_TOKEN environment variable is being used for authentication.
fatal: Cannot prompt because user interactivity has been disabled.
fatal: could not read Password for 'https://***@github.com': terminal prompts disabled

Fix

Prefixed all five pipeline push URLs with x-access-token::

  • common-templates/create-pr.yml
  • common-templates/download-openapi-docs.yml
  • generation-templates/generate-command-metadata.yml
  • weekly-examples-update.yml
  • command-metadata-refresh.yml

The x-access-token:<token> form is also valid for PATs, so this is backward compatible. gh pr create was unaffected (it uses GITHUB_TOKEN via the REST API, not a git URL).

Note: This pull request was created with assistance from GitHub Copilot.

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
@ramsessanchez ramsessanchez requested a review from a team as a code owner July 13, 2026 22:57
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