From 4bd3c768a59b07f90a46fdd42496e9f5b0c3ec13 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Feb 2026 04:58:34 +0000 Subject: [PATCH] fix: GitHub Actions workflows now use GITHUB_TOKEN for dependencies Fixed 4 failing workflow checks: 1. **Build/Lint/Test workflows**: Fixed yarn install authentication - Changed Git URL rewrite to include GITHUB_TOKEN in all rewrites - Added GITHUB_TOKEN and GIT_TERMINAL_PROMPT env vars to yarn install step - Now correctly handles github: dependencies (like libsignal) 2. **PR Comment workflow**: Fixed missing token error - Changed from secrets.PERSONAL_TOKEN to secrets.GITHUB_TOKEN - Workflow now has proper authentication Root cause: Yarn 4.x was trying to clone github: dependencies via SSH, but CI had no SSH keys. Git config now rewrites ALL GitHub URLs to HTTPS with token authentication. https://claude.ai/code/session_015R3U3kiprQiNTTNNt31Sg6 --- .github/workflows/build.yml | 10 ++++++---- .github/workflows/lint.yml | 10 ++++++---- .github/workflows/pr-comment.yml | 2 +- .github/workflows/test.yml | 10 ++++++---- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f87a1fdd..e5156277 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,10 +28,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # Force git to use HTTPS instead of SSH for GitHub repositories - 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 + # Force git to use HTTPS with token instead of SSH for GitHub repositories + git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "ssh://git@github.com/" + git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "git@github.com:" git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" - name: Restore Yarn Cache @@ -46,6 +45,9 @@ jobs: ${{ runner.os }}-yarn- - name: Install dependencies + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GIT_TERMINAL_PROMPT: 0 run: yarn install --immutable - name: Build project diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8fe008d8..43551035 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,10 +28,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # Force git to use HTTPS instead of SSH for GitHub repositories - 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 + # Force git to use HTTPS with token instead of SSH for GitHub repositories + git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "ssh://git@github.com/" + git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "git@github.com:" git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" - name: Restore Yarn Cache @@ -46,6 +45,9 @@ jobs: ${{ runner.os }}-yarn- - name: Install packages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GIT_TERMINAL_PROMPT: 0 run: yarn install --immutable - name: Check linting diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 42c64d8e..c5625ff3 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -18,7 +18,7 @@ jobs: - uses: mshick/add-pr-comment@v2 with: - repo-token: ${{ secrets.PERSONAL_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} message-id: pr-test message: | Thanks for opening this pull request and contributing to the project! diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 328dca54..e19e434f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,10 +29,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # Force git to use HTTPS instead of SSH for GitHub repositories - 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 + # Force git to use HTTPS with token instead of SSH for GitHub repositories + git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "ssh://git@github.com/" + git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "git@github.com:" git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" - name: Restore Yarn Cache @@ -47,6 +46,9 @@ jobs: ${{ runner.os }}-yarn- - name: Install dependencies + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GIT_TERMINAL_PROMPT: 0 run: yarn install --immutable - name: Run tests