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)