Skip to content

fix(git): support custom SCP-style SSH users - #3371

Merged
max-sixty merged 1 commit into
max-sixty:mainfrom
fcoury-oai:fix/scp-style-ssh-usernames
Jul 7, 2026
Merged

fix(git): support custom SCP-style SSH users#3371
max-sixty merged 1 commit into
max-sixty:mainfrom
fcoury-oai:fix/scp-style-ssh-usernames

Conversation

@fcoury-oai

@fcoury-oai fcoury-oai commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Why

Worktrunk currently recognizes SCP-style SSH remotes only when the username is literally git. GitHub configurations can use account or organization aliases such as org-12345678@github.com:organization/repo.git. Worktrunk fails to parse that remote canonically, so wt switch pr:30479 fetches the PR metadata but then exits with No remote found for openai/codex.

What changed

  • Recognize any non-empty username in SCP-style SSH remotes while preserving the canonical host, namespace, and repository.
  • Continue rejecting malformed, userless, and local-path forms that only resemble SCP syntax.
  • Cover canonical project identifiers and same-repository PR switching with custom SSH usernames.

How to Test

  1. Configure a repository remote such as org-14957082@github.com:openai/codex.git.
  2. Run wt switch pr:<number> for a pull request in that repository.
  3. Confirm Worktrunk matches the local remote and switches to the PR branch instead of reporting No remote found.
  4. Verify malformed SCP-style URLs and local paths remain rejected.

Targeted tests:

  • cargo test --lib git::url::tests
  • cargo test --test integration project_identifier_scp_custom_user
  • cargo test --test integration switch_pr_same_repo_custom_ssh_user

@max-sixty
max-sixty merged commit 6ab8632 into max-sixty:main Jul 7, 2026
38 checks passed
@fcoury-oai
fcoury-oai deleted the fix/scp-style-ssh-usernames branch July 7, 2026 12:42
max-sixty added a commit that referenced this pull request Jul 8, 2026
…indow (#3386)

Five commits landed on `main` during #3385's CI wait, so they ship
inside v0.66.0's tree but weren't in its changelog (the step-12 drift
check in the release skill caught this). This adds the user-facing three
to the 0.66.0 section:

- **Codex activity markers**
([#3364](#3364), closes
[#3362](#3362), thanks
@ofek for reporting)
- **SCP-style SSH remotes with custom usernames**
([#3371](#3371), thanks
@fcoury-oai)
- **Windows app-alias Settings path**
([#3372](#3372), thanks
@ofek)

Excluded as internal: #3360 (trait docstrings), #3379 (argv[0] display
refactor). Every entry verified against the actual diffs.

The v0.66.0 tag will point at this PR's squash commit so the tagged tree
carries the complete changelog.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

> _This was written by Claude Code on behalf of Maximilian Roos_

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants