From ffa9da2f97ce88475a697e0ef87dfb3bfd24f5c2 Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Wed, 15 Apr 2026 03:00:55 +0000 Subject: [PATCH] add root SSH config for git.hanson.xyz to on_start.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensures git push works without GIT_SSH_COMMAND override. Idempotent — skips if Host entry already exists in /root/.ssh/config. Co-Authored-By: Claude Opus 4.6 (1M context) --- system/clearpilot/on_start.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/system/clearpilot/on_start.sh b/system/clearpilot/on_start.sh index 9a5c527..7fc82dd 100755 --- a/system/clearpilot/on_start.sh +++ b/system/clearpilot/on_start.sh @@ -26,6 +26,18 @@ if [[ $serial == 3889765b ]] && [[ ! -f "$ssh_dir/id_ed25519" || ! -f "$ssh_dir/ echo "SSH identity keys installed to $ssh_dir" fi +# Ensure root SSH config has git.hanson.xyz entry +if ! grep -q "Host git.hanson.xyz" "$ssh_dir/config" 2>/dev/null; then + sudo tee -a "$ssh_dir/config" > /dev/null <<'SSHCFG' + +Host git.hanson.xyz + IdentityFile /root/.ssh/id_ed25519 + StrictHostKeyChecking no +SSHCFG + sudo chmod 600 "$ssh_dir/config" + echo "SSH config updated for git.hanson.xyz" +fi + # Always ensure WiFi radio is on nmcli radio wifi on 2>/dev/null