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:
@@ -47,7 +47,7 @@ chown -R comma:comma /data/openpilot
|
|||||||
|
|
||||||
### Git
|
### Git
|
||||||
|
|
||||||
- Remote: `git@git.internal.hanson.xyz:brianhansonxyz/comma.git`
|
- Remote: `git@git.hanson.xyz:brianhansonxyz/comma.git`
|
||||||
- Branch: `clearpilot`
|
- Branch: `clearpilot`
|
||||||
- Large model files are tracked in git (intentional — this is a backup)
|
- Large model files are tracked in git (intentional — this is a backup)
|
||||||
|
|
||||||
|
|||||||
@@ -59,9 +59,17 @@ if [[ $serial == 3889765b ]] && [[ ! -f "$ssh_dir/id_ed25519" || ! -f "$ssh_dir/
|
|||||||
echo "SSH identity keys installed to $ssh_dir"
|
echo "SSH identity keys installed to $ssh_dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 4. Pull latest from remote (remote always wins)
|
# 4. Ensure git remote uses SSH (not HTTPS)
|
||||||
echo "Checking for updates..."
|
|
||||||
cd /data/openpilot
|
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
|
git fetch origin clearpilot
|
||||||
LOCAL=$(git rev-parse HEAD)
|
LOCAL=$(git rev-parse HEAD)
|
||||||
REMOTE=$(git rev-parse origin/clearpilot)
|
REMOTE=$(git rev-parse origin/clearpilot)
|
||||||
|
|||||||
Reference in New Issue
Block a user