Troubleshooting
Troubleshooting
Section titled “Troubleshooting”Common issues and their solutions.
Installation Issues
Section titled “Installation Issues”Bootstrap Script Fails
Section titled “Bootstrap Script Fails”Problem: Bootstrap script fails to download or execute.
Solutions:
# Check internet connectivityping -c 3 google.com
# Try manual installation insteadgit clone https://github.com/garygentry/dotfiles.git ~/.dotfilescd ~/.dotfilesgo build -o bin/dotfiles ../bin/dotfiles installGo Not Found
Section titled “Go Not Found”Problem: go: command not found error.
Solutions:
# Install Go manually# macOS (with Homebrew)brew install go
# Ubuntu/Debiansudo apt update && sudo apt install -y golang-go
# Arch Linuxsudo pacman -S go
# Or download from official sitecurl -fsSL https://go.dev/dl/go1.23.6.linux-amd64.tar.gz | sudo tar -C /usr/local -xzexport PATH="/usr/local/go/bin:$PATH"Build Fails
Section titled “Build Fails”Problem: go build fails with errors.
Solutions:
# Ensure Go version is 1.23+go version
# Clean and rebuildgo cleango mod downloadgo build -o bin/dotfiles .
# Check for missing dependenciesgo mod tidyModule Installation Issues
Section titled “Module Installation Issues”Module Fails to Install
Section titled “Module Fails to Install”Problem: A module fails during installation.
Debug Steps:
# Run with verbose outputdotfiles install module-name -v
# Check state file for error detailscat ~/.dotfiles/.state/module-name.json
# Look for the error fieldcat ~/.dotfiles/.state/module-name.json | jq .errorCommon Causes:
- Missing System Requirements:
# Check if required commands existcommand -v git # Replace with required command- Permission Issues:
# Some operations need sudo# Ensure you can run sudo commandssudo -v- Network Issues:
# Check connectivity to package reposcurl -I https://github.comPackage Installation Fails
Section titled “Package Installation Fails”Problem: pkg_install fails in module script.
Solutions:
# Update package manager cache# macOSbrew update
# Ubuntu/Debiansudo apt update
# Arch Linuxsudo pacman -Sy
# Then retrydotfiles install module-nameSSH Module Fails
Section titled “SSH Module Fails”Problem: SSH key generation or configuration fails.
The ssh module’s behavior is driven by modules.ssh.key_source (default generate —
create a local key if none exists). Other values: agent (use an external SSH agent such
as 1Password’s; no local key managed), 1password (retrieve the key via the op CLI, from
modules.ssh.key_item), and none (leave ~/.ssh untouched). Key generation is the
default path, not a fallback — if you meant to use an agent or 1Password, set key_source
accordingly.
Debug:
# Check existing SSH directoryls -la ~/.ssh
# Check permissionsstat ~/.ssh
# Run with verbose outputdotfiles install ssh -vSolutions:
# Backup and remove existing SSH config if corruptedmv ~/.ssh ~/.ssh.backupdotfiles install ssh
# Or remove just the configrm ~/.ssh/configdotfiles install sshGit Module Fails
Section titled “Git Module Fails”Problem: Git configuration fails.
Debug:
# Check current git configgit config --global --list
# Run with verbose outputdotfiles install git -vSolutions:
# Reset git configrm ~/.gitconfigdotfiles install git
# Or edit config.yml with correct valuesvim ~/.dotfiles/config.ymlZsh Module Fails
Section titled “Zsh Module Fails”Problem: Zsh installation or Zinit setup fails.
Debug:
# Check if zsh is installedcommand -v zsh
# Check Zinit directoryls -la ~/.local/share/zinit
# Run with verbose outputdotfiles install zsh -vSolutions:
# Remove Zinit and retryrm -rf ~/.local/share/zinitdotfiles install zsh
# If shell change fails, do it manuallychsh -s $(which zsh)Configuration Issues
Section titled “Configuration Issues”Config File Not Found
Section titled “Config File Not Found”Problem: config.yml not found error.
Solutions:
# Check if file existsls -la ~/.dotfiles/config.yml
# Create from template if missingcat > ~/.dotfiles/config.yml << 'EOF'profile: developer
user: name: "Your Name" email: "your.email@example.com" github_user: "yourusername"EOFInvalid YAML Syntax
Section titled “Invalid YAML Syntax”Problem: YAML parsing errors.
Solutions:
# Validate YAML syntax# Install yq if neededbrew install yq # macOSsudo apt install yq # Ubuntu
# Check syntaxyq eval ~/.dotfiles/config.yml
# Common issues:# - Inconsistent indentation (use spaces, not tabs)# - Missing quotes around special characters# - Unclosed quotes or bracketsProfile Not Found
Section titled “Profile Not Found”Problem: profile 'name' not found error.
Solutions:
# List available profilesls -la ~/.dotfiles/profiles/
# Create custom profilecat > ~/.dotfiles/profiles/custom.yml << 'EOF'modules: - git - zshEOF
# Or use a different profiledotfiles install --profile developerContent Overlay Not Applied
Section titled “Content Overlay Not Applied”Problem: Your overlay’s config.yml values, custom profiles, or custom modules don’t
show up — dotfiles list shows no Source column and your identity/settings are missing.
Cause & fix: the engine only reads an overlay when DOTFILES_CONTENT_DIR points at it.
# Confirm the overlay dir is set and exportedecho "$DOTFILES_CONTENT_DIR" # should print your my-dotfiles pathexport DOTFILES_CONTENT_DIR="$HOME/my-dotfiles"
# When set, list gains a Source column tagging modules built-in/override/customdotfiles listIf bootstrap cloned the overlay, it normally persists this variable; re-run bootstrap with
--content-repo (or set the variable manually) if it isn’t set. See the
Content Overlay guide.
Override Module Ignored (name mismatch)
Section titled “Override Module Ignored (name mismatch)”Problem: You added modules/git/ to your overlay to replace the built-in git module,
but the built-in still runs (or the overlay module shows as custom, not override).
Cause & fix: override precedence is keyed on the module’s name: in module.yml,
not its directory name. To replace a built-in wholesale, the overlay module’s name: must
exactly match the built-in’s (e.g. name: git). An override is a whole-module
replacement — reproduce any parts of the original you still want. dotfiles list tags a
correct override as override and a brand-new module as custom.
Secrets Management Issues
Section titled “Secrets Management Issues”1Password Not Authenticated
Section titled “1Password Not Authenticated”Problem: not authenticated with 1Password error.
Solutions:
# Check if op CLI is installedcommand -v op
# Install 1Password CLI if missing# macOSbrew install 1password-cli
# Ubuntu/Debiancurl -sS https://downloads.1password.com/linux/keys/1password.asc | sudo gpg --dearmor --output /usr/share/keyrings/1password-archive-keyring.gpgecho "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/$(dpkg --print-architecture) stable main" | sudo tee /etc/apt/sources.list.d/1password.listsudo apt update && sudo apt install 1password-cli
# Sign in to 1Passwordeval $(op signin)
# Retry installationdotfiles installSecret Not Found
Section titled “Secret Not Found”Problem: secret not found error.
Solutions:
# Verify secret reference format# Correct: op://vault-name/item-name/field-name# Example: op://Private/GitHub/token
# List vaultsop vault list
# List items in vaultop item list --vault "Private"
# Get specific itemop item get "GitHub" --vault "Private"Skip Secrets
Section titled “Skip Secrets”Problem: Don’t want to use 1Password.
Solution: Nothing to do — the shipped default is already secrets.provider: noop, so
no secrets backend is used and installs need no external tooling. 1Password is opt-in.
If a config or overlay you’re using sets provider: 1password and you want to turn it off,
set it back to noop (and ensure modules.ssh.key_source is generate or agent, not
1password):
secrets: provider: noopmodules: ssh: key_source: generateState Management Issues
Section titled “State Management Issues”Stale State
Section titled “Stale State”Problem: Module appears installed but isn’t actually configured.
Solutions:
# Remove state file to force reinstallrm ~/.dotfiles/.state/module-name.json
# Reinstall moduledotfiles install module-nameCorrupted State
Section titled “Corrupted State”Problem: State file is corrupted or unreadable.
Solutions:
# Remove state filerm ~/.dotfiles/.state/module-name.json
# Or remove all staterm -rf ~/.dotfiles/.state/mkdir -p ~/.dotfiles/.state/
# Reinstalldotfiles installPlatform-Specific Issues
Section titled “Platform-Specific Issues”macOS Issues
Section titled “macOS Issues”Xcode Command Line Tools Required:
# Install if missingxcode-select --installHomebrew Not Found:
# Install Homebrew/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Permission Issues:
# Fix Homebrew permissionssudo chown -R $(whoami) /usr/local/*Ubuntu/Debian Issues
Section titled “Ubuntu/Debian Issues”Package Manager Lock:
# Wait for other package operations to complete# Or find and kill the processps aux | grep aptsudo kill <process-id>
# Remove lock files (use with caution)sudo rm /var/lib/dpkg/lock-frontendsudo rm /var/lib/apt/lists/locksudo dpkg --configure -aPPA Errors:
# Remove problematic PPAsudo add-apt-repository --remove ppa:name/ppasudo apt updateArch Linux Issues
Section titled “Arch Linux Issues”Keyring Issues:
# Reinitialize keyringsudo pacman-key --initsudo pacman-key --populate archlinuxsudo pacman -Sy archlinux-keyringMirror Issues:
# Update mirror listsudo pacman -Sy reflectorsudo reflector --country 'United States' --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlistPerformance Issues
Section titled “Performance Issues”Slow Installation
Section titled “Slow Installation”Problem: Installation takes a very long time.
Causes:
- Slow package mirrors - Try different mirrors
- Network issues - Check bandwidth
- Large downloads - Some packages are big (Go, Zinit plugins, etc.)
Solutions:
# Use faster mirrors# See platform-specific sections above
# Run one module at a timedotfiles install sshdotfiles install gitdotfiles install zshHigh Memory Usage
Section titled “High Memory Usage”Problem: System runs out of memory during installation.
Solutions:
# Close other applications# Increase swap space (Linux)sudo fallocate -l 4G /swapfilesudo chmod 600 /swapfilesudo mkswap /swapfilesudo swapon /swapfileTemplate Rendering Issues
Section titled “Template Rendering Issues”Template Syntax Error
Section titled “Template Syntax Error”Problem: Template rendering fails with syntax error.
Debug:
# Check template filecat ~/.dotfiles/modules/module-name/files/template.tmpl
# Run with verbose output to see full errordotfiles install module-name -vCommon Issues:
// Missing closing brace{{ .User.name
// Wrong access (case-sensitive): .User is the struct field (capital U),// but its keys are lowercase — so .User.Name renders EMPTY.{{ .User.Name }} // Should be {{ .User.name }}
// Using undefined field{{ .NonExistent }} // Field doesn't exist in contextMissing Template Variables
Section titled “Missing Template Variables”Problem: Template expects variables that aren’t set.
Solutions:
# Check config.yml has all required fieldsvim ~/.dotfiles/config.yml
# Add missing fieldsuser: name: "Your Name" email: "your.email@example.com" github_user: "yourusername"Getting Help
Section titled “Getting Help”Enable Verbose Mode
Section titled “Enable Verbose Mode”Always start with verbose output:
dotfiles install -vCheck Logs
Section titled “Check Logs”# State files contain error messagescat ~/.dotfiles/.state/module-name.json | jq .
# Script output is shown with -v flagdotfiles install module-name -v 2>&1 | tee debug.logCreate Debug Report
Section titled “Create Debug Report”When reporting issues, include:
# System informationuname -ago version
# Dotfiles versioncd ~/.dotfiles && git log -1 --oneline
# Module statecat ~/.dotfiles/.state/module-name.json
# Verbose outputdotfiles install module-name -v 2>&1 | tee debug.logAsk for Help
Section titled “Ask for Help”If you’re still stuck:
- Check GitHub Issues
- Search GitHub Discussions
- Create a new issue with debug information
Known Issues
Section titled “Known Issues”Issue: Git signing fails on new systems
Section titled “Issue: Git signing fails on new systems”Workaround: Ensure SSH keys are configured before configuring Git signing. The git
module already depends on ssh, so dependency resolution installs them in the right order
automatically:
# Dependency resolution installs ssh before gitdotfiles install gitIssue: Zsh not set as default shell in containers
Section titled “Issue: Zsh not set as default shell in containers”Expected: Containers may not allow chsh. The zsh module warns but doesn’t fail.
# Manually set shell in containerchsh -s $(which zsh)# Or just run zshzshIssue: Some packages not available in older OS versions
Section titled “Issue: Some packages not available in older OS versions”Workaround: OS-specific scripts attempt to use PPAs or alternative sources, but some packages may not be available.
# Check your OS versionlsb_release -a # Ubuntu/Debianuname -r # All systemsUnattended Mode / CI-CD Issues
Section titled “Unattended Mode / CI-CD Issues”Installation Hangs in CI/CD
Section titled “Installation Hangs in CI/CD”Problem: Installation blocks waiting for input in automated environments.
Solutions:
# Use --unattended flagdotfiles install --unattended
# For bootstrap scriptcurl -sfL https://url/to/bootstrap.sh | bash -s -- --unattendedModules Fail in Docker/CI
Section titled “Modules Fail in Docker/CI”Problem: Some modules require interactive terminal or system features not available in containers.
Solutions:
# Use --skip-failed to continue installationdotfiles install --unattended --skip-failed
# Or create a container-specific profilecat > profiles/docker.yml << 'EOF'modules: - git - zsh # Exclude modules that need GUI or special permissionsEOF
dotfiles install --unattended --profile dockerSecrets Not Available in CI
Section titled “Secrets Not Available in CI”Problem: 1Password prompts block installation in CI/CD pipelines.
Solutions:
# Unattended mode auto-skips secrets authenticationdotfiles install --unattended
# The default provider is already noop; only pin it if an overlay set otherwisecat > config.yml << 'EOF'profile: minimalsecrets: provider: noop # no secrets backendEOF
# Use a profile without secrets-dependent modules (create your own if needed)dotfiles install --unattended --profile minimalNon-Interactive Stdin
Section titled “Non-Interactive Stdin”Problem: Installation hangs when piped from curl or in automation.
Solutions:
# System auto-detects non-interactive stdin, but you can force itdotfiles install --unattended
# Check if running in CI/CD environmentif [ -n "$CI" ]; then dotfiles install --unattendedfiExit Code Handling
Section titled “Exit Code Handling”Problem: Need to handle failures in automated scripts.
Solutions:
#!/bin/bashset -euo pipefail
# Installation with error handlingif dotfiles install --unattended --skip-failed; then echo "Installation successful"else echo "Installation failed with exit code $?" dotfiles status # Show what succeeded exit 1fi
# Verify critical modulesfor module in git zsh; do if ! dotfiles status | grep -q "${module}.*installed"; then echo "ERROR: ${module} not installed" exit 1 fidoneFor comprehensive CI/CD integration examples, see the CI/CD Guide.
See Also
Section titled “See Also”- CLI Reference - Command documentation
- Quick Start - Configuration options and common tasks
- Creating Modules - Module development guide
- CI/CD Guide - Automation and IaC integration