Add bootstrap.sh with zsh and git modules
Cross-distro (RHEL/Debian) VM setup: zsh + oh-my-zsh with a self-healing bash fallback for environments that reset the root filesystem or hardcode bash for new terminals (e.g. Kasm Workspaces), plus git identity and HTTPS credential-store configuration. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env sh
|
||||
# git/install.sh — configure git identity + HTTPS credential storage.
|
||||
# Idempotent: safe to re-run.
|
||||
set -eu
|
||||
|
||||
say() { printf '%s\n' "$*" >&2; }
|
||||
|
||||
GIT_NAME="Nic O'Connor"
|
||||
GIT_EMAIL="nic.oconnor@gmail.com"
|
||||
|
||||
git config --global user.name "$GIT_NAME"
|
||||
git config --global user.email "$GIT_EMAIL"
|
||||
say "git identity: $GIT_NAME <$GIT_EMAIL>"
|
||||
|
||||
# Plaintext credential cache in $HOME (survives container/VM rebuilds that
|
||||
# wipe everything outside $HOME). Git creates ~/.git-credentials with 0600
|
||||
# the first time a credential is saved.
|
||||
git config --global credential.helper store
|
||||
say "credential.helper = store (~/.git-credentials, created on first auth)"
|
||||
|
||||
say "Done. On the next HTTPS push/pull to a new host, git prompts once and caches the credential in ~/.git-credentials."
|
||||
Reference in New Issue
Block a user