fix: use x-access-token username for HTTPS git auth (GitHub compatibility)
x-token-auth is Bitbucket/Gitea-specific; GitHub doesn't recognise it and returns a misleading 403 'Write access not granted'. x-access-token is the username GitHub documents for PAT auth and is also accepted by GitLab/Gitea. https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
This commit is contained in:
parent
def40aa7f9
commit
c7ed5cfe95
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ CLONE_URL="$REPO_URL"
|
||||||
if [ -n "${GIT_TOKEN:-}" ]; then
|
if [ -n "${GIT_TOKEN:-}" ]; then
|
||||||
case "$REPO_URL" in
|
case "$REPO_URL" in
|
||||||
https://*)
|
https://*)
|
||||||
CLONE_URL="https://x-token-auth:${GIT_TOKEN}@${REPO_URL#https://}"
|
CLONE_URL="https://x-access-token:${GIT_TOKEN}@${REPO_URL#https://}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue