You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Host-specific paths in .gitconfig and unreliable postAttachCommand lifecycle #60
The devcontainer setup scripts have two related issues with git/SSH/gh configuration inside the container:
Host-absolute paths in .gitconfig: copy-host-user-conf.sh exports the host's global git config verbatim, embedding host-specific absolute paths (e.g. /Users/<user>/.ssh/id_ed25519_github.pub, /Users/<user>/.config/git/allowed-signers) and host-only entries (Homebrew credential helpers, core.excludesfile). These paths don't exist inside the container.
Unreliable postAttachCommand: All one-time setup (git config placement, SSH key copy, gh auth, pre-commit install) runs via postAttachCommand, which is a known issue with Cursor (and sometimes VS Code) — it frequently doesn't fire, leaving the container without git config, SSH signing keys, or gh authentication.
Steps to Reproduce
Run the install script: curl -sSf .../install.sh | bash -s -- ~/my-project
copy-host-user-conf.sh: awk block now rewrites signingkey and allowedsignersfile to container paths (/root/...) and strips host-only entries (credential, excludesfile, includeIf) at export time
post-create.sh: now runs all one-time setup (init-git.sh, setup-git-conf.sh, init-precommit.sh, uv sync)
setup-git-conf.sh: stripped down to one-time file placement and gh auth (removed SSH agent scanning)
verify-auth.sh: new script for lightweight SSH agent + gh auth verification
post-attach.sh: now only calls verify-auth.sh (no longer critical if it doesn't fire)
Tests updated to expect verify-auth.sh in file lists
Activity
gerchowl commentedon Feb 17, 2026
Fixed in commit 07aaab3 on
devbranch.Changes:
copy-host-user-conf.sh: awk block now rewritessigningkeyandallowedsignersfileto container paths (/root/...) and strips host-only entries (credential,excludesfile,includeIf) at export timepost-create.sh: now runs all one-time setup (init-git.sh,setup-git-conf.sh,init-precommit.sh,uv sync)setup-git-conf.sh: stripped down to one-time file placement and gh auth (removed SSH agent scanning)verify-auth.sh: new script for lightweight SSH agent + gh auth verificationpost-attach.sh: now only callsverify-auth.sh(no longer critical if it doesn't fire)verify-auth.shin file listsfix(setup): rewrite host paths in .gitconfig and refactor lifecycle h…
chore: add post-start lifecycle script and delegate dependency sync t…
chore: docs, setup lifecycle, and justfile formatting fixes (#86)
feat: wire version-check.sh into post-attach lifecycle
chore: release 0.3.0 (#270)