Skip to content

Commit bd5bccf

Browse files
author
Ryan McCarthy
committed
Use access token for checkout
1 parent bcf6591 commit bd5bccf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/push-to-mirror.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
uses: actions/checkout@v5
1818
with:
1919
fetch-depth: 0
20+
token: ${{ secrets.ACCESS_TOKEN }}
2021
- name: Configure Git
2122
run: |
2223
git config --global user.name "github-actions[bot]"
@@ -46,8 +47,8 @@ jobs:
4647
-H "Accept: application/vnd.github.v3+json" \
4748
https://api.github.com/repos/$MIRROR_REPO/collaborators/$USER_LOGIN/permission || echo "Permission check failed - might be fine-grained token"
4849
49-
# Try using the token as username with empty password
50-
git remote add mirror https://$ACCESS_TOKEN:@github.com/$MIRROR_REPO
50+
# Use the standard x-access-token format for GitHub Actions
51+
git remote add mirror https://x-access-token:$ACCESS_TOKEN@github.com/$MIRROR_REPO
5152
5253
# Verify remote was added
5354
git remote -v

0 commit comments

Comments
 (0)