Visitar URL original
fix(git): support custom SCP-style SSH users by fcoury-oai · Pull Request #3371 · max-sixty/worktrunk · GitHub
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

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>
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
worktrunk 0.66.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## Release Notes

### Improved

- **Opt-in JSON schema 2 for `wt list`**: `wt list --format=json` and `wt list statusline --format=json` can now emit a v2 schema, selected via the `[list] json-schema` config key. Schema 2 wraps the rows in an envelope (`schema`, `repo.default_branch`, `repo.forge`, `collected`) and separates "nothing to report" (field absent) from "requested but undetermined" (field `null` — a probe still pending, timed out, or failed). Schema 1 — the existing bare array — remains the default, byte-for-byte; with the key unset, a once-per-process stderr hint shows both values (`= 1` to pin, `= 2` to opt in; suppressed on the statusline surface). [Docs](https://worktrunk.dev/list/#json-output) ([#3357](max-sixty/worktrunk#3357))

- **`wt config approvals list` and `clear --stale`**: `list` shows every command the project config declares — hooks in lifecycle order, aliases, commit-message guidance — grouped into approved and unapproved, with approvals recorded for commands no longer in the config flagged as stale. `clear --stale` removes only those left-behind approvals, echoing each one; valid approvals survive, and a full wipe remains plain `clear`. [Docs](https://worktrunk.dev/config/#wt-config-approvals) ([#3380](max-sixty/worktrunk#3380))

- **Codex sessions show activity markers**: The Codex plugin now ships Codex-native activity hooks, so `wt list` shows 🤖 (working) / 💬 (waiting) for Codex sessions as it does for Claude Code, OpenCode, and Gemini — and Claude-branded events no longer surface inside Codex sessions. Codex has no session-exit event, so the marker rests at 💬 after a session ends until the next session or `wt config state marker clear`. ([#3364](max-sixty/worktrunk#3364), closes [#3362](max-sixty/worktrunk#3362), thanks @ofek for reporting)

### Fixed

- **User hooks no longer inherit `wt`'s `GIT_*` discovery vars**: A user hook that shells out to `git` now discovers its repository from the worktree `wt` sets as its cwd, rather than an inherited `GIT_DIR`/`GIT_WORK_TREE` (e.g. from `wt` run as a `!wt` git alias, or nested under another tool's git hook). `wt` now scrubs the `GIT_*` discovery vars at every hook spawn site — foreground, background, and concurrent. Previously the inherited context leaked into hooks: with both `GIT_DIR` and `GIT_WORK_TREE` present, a hook that ran `git init` would write `core.worktree` into the inherited repo's config, silently redirecting later plain git commands there. `wt`'s own internal git plumbing keeps the inherited context (the absolutize-and-forward behavior from [#1914](max-sixty/worktrunk#1914)); aliases keep it too, since a top-level `wt <alias>` is the user's own command. ([#3374](max-sixty/worktrunk#3374), closes [#3373](max-sixty/worktrunk#3373), thanks @silvanshade for reporting)

- **SCP-style SSH remotes with custom usernames**: Remote URLs like `org-12345678@github.com:owner/repo.git` (GitHub account/org aliases) now parse canonically, so `wt switch pr:<n>` matches the local remote instead of failing with `No remote found`. Malformed and local-path forms that merely resemble SCP syntax are still rejected. ([#3371](max-sixty/worktrunk#3371), thanks @fcoury-oai)

### Documentation

- **Windows app-alias guidance matches current Settings**: The instructions for disabling Windows Terminal's `wt` app-execution alias now point at the current Settings path (Apps → Advanced app settings → App execution aliases). ([#3372](max-sixty/worktrunk#3372), thanks @ofek)

- **`/wt-switch-create` always creates a worktree**: The plugin skill's wording let a session judge that a research or read-only task didn't need isolation and skip the worktree; invoking the command now counts as the explicit request, so the worktree is created unconditionally. ([#3356](max-sixty/worktrunk#3356))

## Install worktrunk 0.66.0

### Install prebuilt binaries via shell script

```sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-installer.sh | sh && wt config shell install
```

### Install prebuilt binaries via powershell script

```sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-installer.ps1 | iex"; git-wt config shell install
```

### Install prebuilt binaries via Homebrew

```sh
brew install worktrunk && wt config shell install
```

## Download worktrunk 0.66.0

|  File  | Platform | Checksum |
|--------|----------|----------|
| [worktrunk-aarch64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-aarch64-apple-darwin.tar.xz) | Apple Silicon macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-aarch64-apple-darwin.tar.xz.sha256) |
| [worktrunk-x86_64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-x86_64-apple-darwin.tar.xz) | Intel macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-x86_64-apple-darwin.tar.xz.sha256) |
| [worktrunk-x86_64-pc-windows-msvc.zip](https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-x86_64-pc-windows-msvc.zip) | x64 Windows | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-x86_64-pc-windows-msvc.zip.sha256) |
| [worktrunk-aarch64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-aarch64-unknown-linux-musl.tar.xz) | ARM64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-aarch64-unknown-linux-musl.tar.xz.sha256) |
| [worktrunk-x86_64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-x86_64-unknown-linux-musl.tar.xz) | x64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.66.0/worktrunk-x86_64-unknown-linux-musl.tar.xz.sha256) |



### Install via Cargo

```sh
cargo install worktrunk && wt config shell install
```

### Install via Winget (Windows)

```sh
winget install max-sixty.worktrunk && git-wt config shell install
```

### Install via AUR (Arch Linux)

```sh
paru worktrunk-bin && wt config shell install
```
</pre>
  <p>View the full release notes at <a href="https://github.com/max-sixty/worktrunk/releases/tag/v0.66.0">https://github.com/max-sixty/worktrunk/releases/tag/v0.66.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!13854
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