Transition to GitHub App auth, remove azuresdk-github-pat usage#10594
Merged
Conversation
Related to Azure/azure-sdk-tools#9842 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
commit: |
Contributor
|
No changes needing a change description found. |
|
You can try these changes here
|
timotheeguerin
approved these changes
May 12, 2026
JoshLove-msft
approved these changes
May 13, 2026
github-merge-queue Bot
pushed a commit
that referenced
this pull request
May 16, 2026
… tokens (#10710) ## Why #10594 transitioned the publish pipeline from a static PAT (`azuresdk-github-pat`) to a GitHub App installation token minted via `eng/common/scripts/login-to-github.ps1`. The token is then passed into `Submit-AzureSdkForNetPr.ps1` as `-AuthToken '$(GH_TOKEN)'`. The script builds the push URL like this: ```powershell $remoteUrl = "https://$AuthToken@github.com/$RepoOwner/$RepoName.git" git push $remoteUrl $PRBranch ``` That bare-token form works with classic PATs (GitHub accepts username=PAT, empty password) but **fails with GitHub App installation tokens** (`ghs_*`). git treats the token as the username and prompts for a password, producing the failure observed in the latest pipeline run: ``` fatal: could not read Password for 'https://***@github.com': terminal prompts disabled ``` ## Fix Use the `x-access-token` username scheme, which is the documented form that works for **both** classic PATs and GitHub App installation tokens: ```powershell $remoteUrl = "https://x-access-token:$AuthToken@github.com/$RepoOwner/$RepoName.git" ``` One-line change. No behavior difference for the previous PAT path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Related to Azure/azure-sdk-tools#9842