From e98ae2f9d1d51d5aeccee9aabeb0c208439da198 Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Wed, 15 Apr 2026 02:44:11 +0000 Subject: [PATCH] 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) --- CLAUDE.md | 2 +- system/clearpilot/provision.sh | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4a514b6..f0ad3af 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,7 +47,7 @@ chown -R comma:comma /data/openpilot ### Git -- Remote: `git@git.internal.hanson.xyz:brianhansonxyz/comma.git` +- Remote: `git@git.hanson.xyz:brianhansonxyz/comma.git` - Branch: `clearpilot` - Large model files are tracked in git (intentional — this is a backup) diff --git a/system/clearpilot/provision.sh b/system/clearpilot/provision.sh index 38f4c43..e022e6c 100644 --- a/system/clearpilot/provision.sh +++ b/system/clearpilot/provision.sh @@ -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)