Skip to content

Commit 0136273

Browse files
claudesinelaw
authored andcommitted
ci(winget): inject PAT into git URLs for push auth
gh auth setup-git doesn't reliably register a credential helper when only GH_TOKEN env is set (no interactive gh auth login), so git push to the winget-pkgs fork was failing with exit 128. Use a global url.insteadOf rewrite to embed the token in github.com HTTPS URLs.
1 parent 87d9eb2 commit 0136273

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/winget-publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ jobs:
3434
git config --global user.name "github-actions[bot]"
3535
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
3636
37-
- name: Configure gh to use PAT for git auth
38-
run: gh auth setup-git
37+
- name: Configure git credentials for github.com
38+
run: |
39+
git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/"
3940
4041
- name: Publish to winget-pkgs
4142
run: ./scripts/winget-publish.py "${VERSION}"

0 commit comments

Comments
 (0)