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
fix(cli): SSH key prefix ignores the devcontainer name when devcontainer.json holds a URL #487
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/cliCore CLI framework, Typer subcommands, options, and tablestype/bugType bug: the code does not do what it must
_resolve_prefix_from_devcontainer (src/devops_cli/crypto/ssh_keys.py) strips JSONC comments with re.sub(r"//.*$", "", text, flags=re.MULTILINE). That also cuts every string containing //. Since #485, .devcontainer/devcontainer.json holds "credential.https://github.com.helper" values. The stripped text no longer parses, the function returns None, and get_ssh_key_prefix() falls back to the current directory's name.
As a result, devops ssh generate names keys after the checkout directory instead of the devcontainer (devops-cli) in any checkout whose directory has a different name, git worktrees included. tests/test_ssh.py::test_ssh_generate_key_collision fails in those checkouts, and the pre-push hook blocks pushes from them. It passes only where the directory happens to be named devops-cli, as in GitHub CI.
Fix
commands/devcontainer.py already has a string-aware JSONC stripper (_strip_json_comments). Move it to a shared module and use it in both places.
Acceptance criteria
The devcontainer name is used as the SSH key prefix when devcontainer.json contains // inside strings.
One JSONC comment stripper is shared by the devcontainer command and the SSH key prefix lookup.
A test covers a URL-valued string next to real comments.
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/cliCore CLI framework, Typer subcommands, options, and tablestype/bugType bug: the code does not do what it must
Activity
fix(cli): read the devcontainer name for SSH key prefixes despite URL…
dan-petty commentedon Sep 24, 2026
Closed by #488, merged into
release/v0.2.23.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.23 (#681)