Skip to content

Commit 0fe50ac

Browse files
mariomeyerclaude
andcommitted
fix(stacks): add username to git credential helper for HTTPS clone
GitHub HTTPS auth requires both username and password. The credential helper only output password=$GH_TOKEN, causing clone failures in K8s. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 145830b commit 0fe50ac

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

stacks/laravel/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [ -n "$GIT_SSH_KEY_B64" ]; then
1818
chmod 600 ~/.ssh/id_ed25519
1919
ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null
2020
elif [ -n "$GH_TOKEN" ]; then
21-
git config --global credential.helper '!f() { echo "password=$GH_TOKEN"; }; f'
21+
git config --global credential.helper '!f() { echo "username=x-access-token"; echo "password=$GH_TOKEN"; }; f'
2222
if echo "$REPO_URL" | grep -q '^git@'; then
2323
REPO_URL=$(echo "$REPO_URL" | sed 's|^git@github.com:|https://github.com/|; s|\.git$||').git
2424
fi

stacks/node/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if [ -n "$GIT_SSH_KEY_B64" ]; then
1717
chmod 600 ~/.ssh/id_ed25519
1818
ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null
1919
elif [ -n "$GH_TOKEN" ]; then
20-
git config --global credential.helper '!f() { echo "password=$GH_TOKEN"; }; f'
20+
git config --global credential.helper '!f() { echo "username=x-access-token"; echo "password=$GH_TOKEN"; }; f'
2121
if echo "$REPO_URL" | grep -q '^git@'; then
2222
REPO_URL=$(echo "$REPO_URL" | sed 's|^git@github.com:|https://github.com/|; s|\.git$||').git
2323
fi

0 commit comments

Comments
 (0)