You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write-Error "GIT_PAT was rejected by GitHub (HTTP $code). It is likely expired, revoked, or lacks access to $env:GITHUB_REPOSITORY. Regenerate the token and update the GIT_PAT secret. Details: $($_.Exception.Message)"
52
+
exit 1
53
+
}
54
+
if ($null -ne $repo.permissions -and -not $repo.permissions.push) {
55
+
Write-Error "GIT_PAT authenticated but does not have push access to $env:GITHUB_REPOSITORY. Grant 'repo' (classic PAT) or Contents: read & write (fine-grained PAT)."
56
+
exit 1
57
+
}
58
+
Write-Host "GIT_PAT validated: authenticated with push access to $env:GITHUB_REPOSITORY."
Write-Error "GIT_PAT was rejected by GitHub (HTTP $code). It is likely expired, revoked, or lacks access to $env:GITHUB_REPOSITORY. Regenerate the token and update the GIT_PAT secret. Details: $($_.Exception.Message)"
52
+
exit 1
53
+
}
54
+
if ($null -ne $repo.permissions -and -not $repo.permissions.push) {
55
+
Write-Error "GIT_PAT authenticated but does not have push access to $env:GITHUB_REPOSITORY. Grant 'repo' (classic PAT) or Contents: read & write (fine-grained PAT)."
56
+
exit 1
57
+
}
58
+
Write-Host "GIT_PAT validated: authenticated with push access to $env:GITHUB_REPOSITORY."
Write-Error "GIT_PAT was rejected by GitHub (HTTP $code). It is likely expired, revoked, or lacks access to $env:GITHUB_REPOSITORY. Regenerate the token and update the GIT_PAT secret. Details: $($_.Exception.Message)"
71
+
exit 1
72
+
}
73
+
if ($null -ne $repo.permissions -and -not $repo.permissions.push) {
74
+
Write-Error "GIT_PAT authenticated but does not have push access to $env:GITHUB_REPOSITORY. Grant 'repo' (classic PAT) or Contents: read & write (fine-grained PAT)."
75
+
exit 1
76
+
}
77
+
Write-Host "GIT_PAT validated: authenticated with push access to $env:GITHUB_REPOSITORY."
0 commit comments