fix(ci): add GITHUB_TOKEN authentication for git operations
fix(ci): add GITHUB_TOKEN authentication for git operations
This commit is contained in:
@@ -25,11 +25,14 @@ jobs:
|
|||||||
corepack prepare yarn@4.x --activate
|
corepack prepare yarn@4.x --activate
|
||||||
|
|
||||||
- name: Configure Git for HTTPS
|
- name: Configure Git for HTTPS
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# Force git to use HTTPS instead of SSH for GitHub repositories
|
# 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 "ssh://git@github.com/"
|
||||||
git config --global url."https://github.com/".insteadOf "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: Restore Yarn Cache
|
- name: Restore Yarn Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
|||||||
@@ -25,11 +25,14 @@ jobs:
|
|||||||
corepack prepare yarn@4.x --activate
|
corepack prepare yarn@4.x --activate
|
||||||
|
|
||||||
- name: Configure Git for HTTPS
|
- name: Configure Git for HTTPS
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# Force git to use HTTPS instead of SSH for GitHub repositories
|
# 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 "ssh://git@github.com/"
|
||||||
git config --global url."https://github.com/".insteadOf "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: Restore Yarn Cache
|
- name: Restore Yarn Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
|||||||
@@ -34,11 +34,14 @@ jobs:
|
|||||||
corepack prepare yarn@4.x --activate
|
corepack prepare yarn@4.x --activate
|
||||||
|
|
||||||
- name: Configure Git for HTTPS
|
- name: Configure Git for HTTPS
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# Force git to use HTTPS instead of SSH for GitHub repositories
|
# 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 "ssh://git@github.com/"
|
||||||
git config --global url."https://github.com/".insteadOf "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: Restore Yarn Cache
|
- name: Restore Yarn Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
|||||||
@@ -33,11 +33,14 @@ jobs:
|
|||||||
corepack prepare yarn@4.x --activate
|
corepack prepare yarn@4.x --activate
|
||||||
|
|
||||||
- name: Configure Git for HTTPS
|
- name: Configure Git for HTTPS
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# Force git to use HTTPS instead of SSH for GitHub repositories
|
# 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 "ssh://git@github.com/"
|
||||||
git config --global url."https://github.com/".insteadOf "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: Restore Yarn Cache
|
- name: Restore Yarn Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
|||||||
@@ -26,11 +26,14 @@ jobs:
|
|||||||
corepack prepare yarn@4.x --activate
|
corepack prepare yarn@4.x --activate
|
||||||
|
|
||||||
- name: Configure Git for HTTPS
|
- name: Configure Git for HTTPS
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# Force git to use HTTPS instead of SSH for GitHub repositories
|
# 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 "ssh://git@github.com/"
|
||||||
git config --global url."https://github.com/".insteadOf "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: Restore Yarn Cache
|
- name: Restore Yarn Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
|||||||
@@ -28,11 +28,14 @@ jobs:
|
|||||||
corepack prepare yarn@4.x --activate
|
corepack prepare yarn@4.x --activate
|
||||||
|
|
||||||
- name: Configure Git for HTTPS
|
- name: Configure Git for HTTPS
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# Force git to use HTTPS instead of SSH for GitHub repositories
|
# 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 "ssh://git@github.com/"
|
||||||
git config --global url."https://github.com/".insteadOf "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
|
- name: Install packages
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -35,11 +35,14 @@ jobs:
|
|||||||
corepack prepare yarn@4.x --activate
|
corepack prepare yarn@4.x --activate
|
||||||
|
|
||||||
- name: Configure Git for HTTPS
|
- name: Configure Git for HTTPS
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# Force git to use HTTPS instead of SSH for GitHub repositories
|
# 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 "ssh://git@github.com/"
|
||||||
git config --global url."https://github.com/".insteadOf "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: Restore Yarn Cache
|
- name: Restore Yarn Cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user