Skip to content

Commit 490c3f9

Browse files
committed
fix: fix ssh errors
1 parent 29ddf92 commit 490c3f9

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

apps/web/scripts/init-submodules.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ set -e # Exit immediately on any error
55

66
# Use HTTPS with token if available, otherwise try SSH
77
if [ -n "$GITHUB_TOKEN" ]; then
8-
# Configure git to use token for HTTPS
9-
# This allows access to private repositories without SSH setup
10-
git config --global url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
11-
git config --global url."https://${GITHUB_TOKEN}@github.com/".insteadOf "git@github.com:"
12-
echo "Configured git to use GitHub token for private repository access"
8+
git config --global credential.helper store
9+
echo "https://${GITHUB_TOKEN}@github.com" > ~/.git-credentials
10+
chmod 600 ~/.git-credentials
11+
echo "Configured git credential helper for GitHub token"
1312
elif [ -n "$GIT_SSH_KEY" ]; then
1413
# Fallback to SSH if token is not available
1514
mkdir -p ~/.ssh || { echo "Failed to create ~/.ssh directory" >&2; exit 1; }

0 commit comments

Comments
 (0)