From 3074d161e54b428a0f33545696a595f68ace66b5 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 15 May 2026 19:07:36 -0700 Subject: [PATCH] Use x-access-token scheme so push works with GitHub App installation tokens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #10594 transitioned the publish pipeline from a static PAT (azuresdk-github-pat) to a GitHub App installation token minted via login-to-github.ps1. Installation tokens (ghs_*) cannot be used in the bare 'https://TOKEN@github.com/' form ΓÇö git treats the token as the username and prompts for a password, producing: fatal: could not read Password for 'https://***@github.com': terminal prompts disabled Switch the push URL to 'https://x-access-token:TOKEN@github.com/' which works for both classic PATs and GitHub App installation tokens. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../eng/scripts/Submit-AzureSdkForNetPr.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1 b/packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1 index af4a36a0a2c..dce2f29ada0 100755 --- a/packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1 +++ b/packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1 @@ -689,9 +689,10 @@ try { throw "Failed to commit changes" } - # Push the branch + # Push the branch. Use the x-access-token username scheme so the URL works + # both with classic PATs and with GitHub App installation tokens (ghs_*). Write-Host "Pushing branch to remote..." - $remoteUrl = "https://$AuthToken@github.com/$RepoOwner/$RepoName.git" + $remoteUrl = "https://x-access-token:$AuthToken@github.com/$RepoOwner/$RepoName.git" git push $remoteUrl $PRBranch if ($LASTEXITCODE -ne 0) { throw "Failed to push branch"