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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user