fix(ci): add GITHUB_TOKEN authentication for git operations

Yarn 4 converts HTTPS URLs to SSH internally. Added token-based
authentication using GITHUB_TOKEN to allow accessing public GitHub
repositories without SSH keys.

https://claude.ai/code/session_01QPt4WssG6jjEciQKdVpFtK
This commit is contained in:
Claude
2026-02-02 17:47:08 +00:00
parent fd9fc3541b
commit 16699781c7
7 changed files with 28 additions and 7 deletions
+4 -1
View File
@@ -28,11 +28,14 @@ jobs:
corepack prepare yarn@4.x --activate
- name: Configure Git for HTTPS
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Force git to use HTTPS instead of SSH for GitHub repositories
# This fixes "Permission denied (publickey)" errors in CI
git config --global url."https://github.com/".insteadOf "ssh://git@github.com/"
git config --global url."https://github.com/".insteadOf "git@github.com:"
# Configure git to use GITHUB_TOKEN for authentication
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Install packages
run: |