Skip to content

Transition to GitHub App auth, remove azuresdk-github-pat usage#10594

Merged
timotheeguerin merged 3 commits into
mainfrom
RemoveAzsdkPatUsage
May 14, 2026
Merged

Transition to GitHub App auth, remove azuresdk-github-pat usage#10594
timotheeguerin merged 3 commits into
mainfrom
RemoveAzsdkPatUsage

Conversation

@scbedd
Copy link
Copy Markdown
Contributor

@scbedd scbedd commented May 4, 2026

Related to Azure/azure-sdk-tools#9842

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp eng labels May 4, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 4, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-csharp@10594

commit: 7e6cce7

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

No changes needing a change description found.

@azure-sdk-automation
Copy link
Copy Markdown

azure-sdk-automation Bot commented May 4, 2026

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Comment thread eng/tsp-core/pipelines/pr-tools.yml
@scbedd scbedd self-assigned this May 5, 2026
@github-project-automation github-project-automation Bot moved this to Untriaged in Azure MCP Server May 5, 2026
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server May 13, 2026
@scbedd scbedd added this pull request to the merge queue May 13, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 14, 2026
@timotheeguerin timotheeguerin added this pull request to the merge queue May 14, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 14, 2026
@timotheeguerin timotheeguerin added this pull request to the merge queue May 14, 2026
Merged via the queue into main with commit 7f8ead6 May 14, 2026
64 checks passed
@timotheeguerin timotheeguerin deleted the RemoveAzsdkPatUsage branch May 14, 2026 15:19
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server May 14, 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp eng

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants