huskies: merge 1135 story Bootstrap Claude credentials into newly-launched project sleds

This commit is contained in:
dave
2026-05-18 12:01:05 +00:00
parent 26f4da7ba5
commit 3444ff4e29
2 changed files with 126 additions and 2 deletions
+10
View File
@@ -1,6 +1,16 @@
#!/bin/sh
set -e
# ── Claude credentials ────────────────────────────────────────────────
# The `new project` command bind-mounts the host ~/.claude/.credentials.json
# at /run/claude-credentials-src:ro. We copy it here so the huskies user
# owns the file and mode 0600 is enforced regardless of host uid/gid.
if [ -f /run/claude-credentials-src ]; then
mkdir -p /home/huskies/.claude
cp /run/claude-credentials-src /home/huskies/.claude/.credentials.json
chmod 600 /home/huskies/.claude/.credentials.json
fi
# ── SSH authorized key ────────────────────────────────────────────────
# HUSKIES_SSH_PUBKEY is set by `new project` when it generates a keypair.
# Write it to authorized_keys so the user can connect with the matching