File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -266,10 +266,13 @@ runs:
266266 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
267267 # Remove checkout's credential helpers so the app token in the URL is used
268268 git config --unset-all http.https://github.com/.extraheader || true
269- # checkout@v6 uses includeIf.gitdir entries pointing to credential files
269+ # checkout@v6 uses includeIf.gitdir entries pointing to credential files;
270+ # remove entries AND delete the credential files themselves
270271 git config --local --get-regexp 'includeIf\..*\.path' | while read key value; do
271272 git config --local --unset "$key" || true
273+ rm -f "$value"
272274 done || true
275+ rm -f /home/runner/work/_temp/git-credentials-*.config
273276 git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git"
274277 # Unshallow if needed — shallow clones can cause push failures
275278 if [ -f "$(git rev-parse --git-dir)/shallow" ]; then
You can’t perform that action at this time.
0 commit comments