fix git remote: use SSH URL, add remote fixup step to provision.sh

Provision script now checks and corrects the git origin URL to the
SSH remote before fetching updates. Also fixed CLAUDE.md to reflect
the correct hostname (git.hanson.xyz, not git.internal.hanson.xyz).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-15 02:44:11 +00:00
parent 531b3edcd2
commit e98ae2f9d1
2 changed files with 11 additions and 3 deletions

View File

@@ -59,9 +59,17 @@ if [[ $serial == 3889765b ]] && [[ ! -f "$ssh_dir/id_ed25519" || ! -f "$ssh_dir/
echo "SSH identity keys installed to $ssh_dir"
fi
# 4. Pull latest from remote (remote always wins)
echo "Checking for updates..."
# 4. Ensure git remote uses SSH (not HTTPS)
cd /data/openpilot
EXPECTED_REMOTE="git@git.hanson.xyz:brianhansonxyz/comma.git"
CURRENT_REMOTE=$(git remote get-url origin 2>/dev/null)
if [ "$CURRENT_REMOTE" != "$EXPECTED_REMOTE" ]; then
echo "Fixing git remote: $CURRENT_REMOTE -> $EXPECTED_REMOTE"
git remote set-url origin "$EXPECTED_REMOTE"
fi
# 5. Pull latest from remote (remote always wins)
echo "Checking for updates..."
git fetch origin clearpilot
LOCAL=$(git rev-parse HEAD)
REMOTE=$(git rev-parse origin/clearpilot)