···504504log_step "PHASE 6: SSL certificates"
505505ensure_ssl_dev_certs
506506507507-log_step "PHASE 7: GitHub authentication"
508508-# Login to Github - use GH_TOKEN from vault if available
509509-set -l gh_authenticated 1
510510-if not gh auth status >/dev/null 2>&1
511511- if test -n "$GH_TOKEN"
512512- log_info "Authenticating to GitHub using GH_TOKEN..."
513513- echo $GH_TOKEN | gh auth login --with-token
514514- if gh auth status >/dev/null 2>&1
515515- log_ok "GitHub authentication successful"
516516- else
517517- log_error "GitHub authentication failed"
518518- log_warn "Continuing without GitHub auth; vault/git operations may be limited."
519519- set gh_authenticated 0
520520- end
521521- else
522522- log_warn "Not logged into GitHub and no GH_TOKEN available."
523523- log_warn "Continuing startup without GitHub auth."
524524- set gh_authenticated 0
525525- end
526526-else
527527- log_ok "Already authenticated to GitHub"
528528-end
507507+log_step "PHASE 7: GitHub authentication"
508508+# Login to Github - use GH_TOKEN from vault if available
509509+set -l gh_authenticated 1
510510+if not gh auth status >/dev/null 2>&1
511511+ if test -n "$GH_TOKEN"
512512+ log_info "Authenticating to GitHub using GH_TOKEN..."
513513+ echo $GH_TOKEN | gh auth login --with-token
514514+ if gh auth status >/dev/null 2>&1
515515+ log_ok "GitHub authentication successful"
516516+ else
517517+ log_error "GitHub authentication failed"
518518+ log_warn "Continuing without GitHub auth; vault/git operations may be limited."
519519+ set gh_authenticated 0
520520+ end
521521+ else
522522+ log_warn "Not logged into GitHub and no GH_TOKEN available."
523523+ log_warn "Continuing startup without GitHub auth."
524524+ set gh_authenticated 0
525525+ end
526526+else
527527+ log_ok "Already authenticated to GitHub"
528528+end
529529530530log_step "PHASE 8: Git configuration"
531531if test -n "$GIT_USER_EMAIL"
···544544# Set rebase as default for pull operations.
545545git config --global pull.rebase true
546546547547-# Disable GPG signing to prevent commit issues in dev environment
548548-git config --global commit.gpgsign false
549549-550550-# Make sure git is setup and authorized for making commits via `gh`.
551551-if test $gh_authenticated -eq 1
552552- gh auth setup-git
553553-else
554554- log_warn "Skipping 'gh auth setup-git' because GitHub auth is unavailable."
555555-end
547547+# Disable GPG signing to prevent commit issues in dev environment
548548+git config --global commit.gpgsign false
549549+550550+# Make sure git is setup and authorized for making commits via `gh`.
551551+if test $gh_authenticated -eq 1
552552+ gh auth setup-git
553553+else
554554+ log_warn "Skipping 'gh auth setup-git' because GitHub auth is unavailable."
555555+end
556556557557# Ensure GPG signing is disabled at both global and local levels (GitHub CLI might re-enable it)
558558git config --global commit.gpgsign false
···673673 log_ok "Fixed permissions for /home/me/.ssh"
674674end
675675676676-# Fix Copilot CLI directory permissions (volume mount may have root ownership)
677677-if test -d /home/me/.copilot
678678- sudo chown -R me:me /home/me/.copilot 2>/dev/null
679679- sudo chmod 700 /home/me/.copilot 2>/dev/null
676676+# Fix Copilot CLI directory permissions (volume mount may have root ownership)
677677+if test -d /home/me/.copilot
678678+ sudo chown -R me:me /home/me/.copilot 2>/dev/null
679679+ sudo chmod 700 /home/me/.copilot 2>/dev/null
680680 # Ensure pkg directory exists and is writable for package extraction
681681 mkdir -p /home/me/.copilot/pkg 2>/dev/null
682682 chmod 755 /home/me/.copilot/pkg 2>/dev/null
683683- sudo chmod 600 /home/me/.copilot/config.json 2>/dev/null
684684- echo "✅ Fixed permissions for /home/me/.copilot (Copilot CLI config)"
685685-end
686686-687687-# Fix Claude/Codex config directory permissions after bind mounts are attached.
688688-# On Linux hosts, these mounts keep host ownership, so UID remapping is the main
689689-# fix; this container-side pass normalizes modes when ownership is already writable.
690690-for dir in /home/me/.claude /home/me/.codex
691691- if test -d $dir
692692- sudo chown -R me:me $dir 2>/dev/null
693693- chmod 700 $dir 2>/dev/null
694694- find $dir -type d -exec chmod 700 {} + 2>/dev/null
695695- find $dir -type f -exec chmod 600 {} + 2>/dev/null
696696- echo "✅ Fixed permissions for $dir"
697697- end
698698-end
699699-700700-if test -f /home/me/.claude.json
701701- sudo chown me:me /home/me/.claude.json 2>/dev/null
702702- chmod 600 /home/me/.claude.json 2>/dev/null
703703- echo "✅ Fixed permissions for /home/me/.claude.json"
704704-end
705705-706706-# Fix VS Code extension SecretStorage persistence paths.
707707-for dir in /home/me/.config/Code/User/globalStorage /home/me/.config/Code/User/workspaceStorage
708708- if test -d $dir
709709- sudo chown -R me:me $dir 2>/dev/null
710710- find $dir -type d -exec chmod 700 {} + 2>/dev/null
711711- find $dir -type f -exec chmod 600 {} + 2>/dev/null
712712- echo "✅ Fixed permissions for $dir"
713713- end
714714-end
715715-716716-if test -d /home/me/.local/share/keyrings
717717- sudo chown -R me:me /home/me/.local/share/keyrings 2>/dev/null
718718- chmod 700 /home/me/.local/share/keyrings 2>/dev/null
719719- find /home/me/.local/share/keyrings -type f -exec chmod 600 {} + 2>/dev/null
720720- echo "✅ Fixed permissions for /home/me/.local/share/keyrings"
721721-end
722722-723723-# --- GPG agent: cache passphrase for the entire container lifetime ---
724724-mkdir -p /home/me/.gnupg 2>/dev/null
725725-chmod 700 /home/me/.gnupg
683683+ sudo chmod 600 /home/me/.copilot/config.json 2>/dev/null
684684+ echo "✅ Fixed permissions for /home/me/.copilot (Copilot CLI config)"
685685+end
686686+687687+# Fix Claude/Codex config directory permissions after bind mounts are attached.
688688+# On Linux hosts, these mounts keep host ownership, so UID remapping is the main
689689+# fix; this container-side pass normalizes modes when ownership is already writable.
690690+for dir in /home/me/.claude /home/me/.codex
691691+ if test -d $dir
692692+ sudo chown -R me:me $dir 2>/dev/null
693693+ chmod 700 $dir 2>/dev/null
694694+ find $dir -type d -exec chmod 700 {} + 2>/dev/null
695695+ find $dir -type f -exec chmod 600 {} + 2>/dev/null
696696+ echo "✅ Fixed permissions for $dir"
697697+ end
698698+end
699699+700700+if test -f /home/me/.claude.json
701701+ sudo chown me:me /home/me/.claude.json 2>/dev/null
702702+ chmod 600 /home/me/.claude.json 2>/dev/null
703703+ echo "✅ Fixed permissions for /home/me/.claude.json"
704704+end
705705+706706+# Fix VS Code extension SecretStorage persistence paths.
707707+for dir in /home/me/.config/Code/User/globalStorage /home/me/.config/Code/User/workspaceStorage
708708+ if test -d $dir
709709+ sudo chown -R me:me $dir 2>/dev/null
710710+ find $dir -type d -exec chmod 700 {} + 2>/dev/null
711711+ find $dir -type f -exec chmod 600 {} + 2>/dev/null
712712+ echo "✅ Fixed permissions for $dir"
713713+ end
714714+end
715715+716716+if test -d /home/me/.local/share/keyrings
717717+ sudo chown -R me:me /home/me/.local/share/keyrings 2>/dev/null
718718+ chmod 700 /home/me/.local/share/keyrings 2>/dev/null
719719+ find /home/me/.local/share/keyrings -type f -exec chmod 600 {} + 2>/dev/null
720720+ echo "✅ Fixed permissions for /home/me/.local/share/keyrings"
721721+end
722722+723723+# --- GPG agent: cache passphrase for the entire container lifetime ---
724724+mkdir -p /home/me/.gnupg 2>/dev/null
725725+chmod 700 /home/me/.gnupg
726726printf "allow-loopback-pinentry\npinentry-program /usr/sbin/pinentry-curses\ndefault-cache-ttl 999999\nmax-cache-ttl 999999\n" > /home/me/.gnupg/gpg-agent.conf
727727gpgconf --reload gpg-agent 2>/dev/null
728728log_ok "GPG agent configured (passphrase cached for container lifetime)"
729729730730-if not test -d /home/me/aesthetic-computer/aesthetic-computer-code
731731- gh repo clone whistlegraph/aesthetic-computer-code /home/me/aesthetic-computer/aesthetic-computer-code
732732-else
733733- cd /home/me/aesthetic-computer/aesthetic-computer-vault
734734- git pull
735735-end
730730+cd /home/me/aesthetic-computer/aesthetic-computer-vault
731731+git pull
736732737733# Function to check and install npm dependencies in a directory
738734set -g NODE_DEPS_CHECK_SCRIPT /workspaces/aesthetic-computer/.devcontainer/scripts/check-node-deps.mjs
-3
.gitignore
···71717272# any instance of the aesthetic-computer-vault repository
7373aesthetic-computer-vault/
7474-# any instance of the aesthetic-computer-code repository
7575-aesthetic-computer-code/
7676-7774# Local clones of external repos
7875feral-file/
7976modes/