Skip to content

Fix Windows ct-registry: OpenSSH client + cache ordering - #66

Merged
ocots merged 4 commits into
mainfrom
fix/windows-ct-registry
Jul 28, 2026
Merged

Fix Windows ct-registry: OpenSSH client + cache ordering#66
ocots merged 4 commits into
mainfrom
fix/windows-ct-registry

Conversation

@ocots

@ocots ocots commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Enable ct-registry on windows-latest (previously excluded via runner.os != 'Windows', with no recorded reason). julia-actions/add-julia-registry invokes bare ssh-agent/ssh-add/ssh-keyscan (PATH lookup), which resolves to Windows' System32 OpenSSH port by default. That port:

    • treats a bare ssh-agent invocation as a Windows-service start rather than forking a background agent (unable to start ssh-agent service, error :1058 / ERROR_SERVICE_DISABLED), and
    • is old enough that ssh-keyscan github.com cannot negotiate the sntrup761x25519-sha512@openssh.com post-quantum KEX GitHub now offers (choose_kex: unsupported KEX method).

    Git for Windows ships its own MSYS2-based OpenSSH client that behaves like the Unix tools these actions expect, and is already installed on GitHub-hosted Windows runners — prepend it to PATH instead of touching the Windows service.

  • Move the Julia cache steps before Add ct-registry. julia-actions/cache also restores a cached ~/.julia/registries, but logs Julia depot registries already exist. Skipping restoring of cached registries... and self-documents: "Please ensure that julia-actions/cache precedes any workflow steps which add registries." With Add ct-registry running first, the registries (General + ct-registry, ~700MB) were being freshly git-cloned on every single run, on every OS, instead of ever being cached.

Verified on CTDirect.jl#614 with an experimental caller pointed at this branch: Add ct-registry now succeeds on windows-latest (both 1.10 and 1.12), alongside a ubuntu-latest baseline.

Test plan

  • Ran CTDirect.jl's test-cpu-github job against this branch (runs_on: ["ubuntu-latest", "windows-latest"], use_ct_registry: true) — Add ct-registry, Build Julia package succeeded on all 4 matrix entries.
  • Confirm Run tests also passes end-to-end (in progress at PR creation time).

🤖 Generated with Claude Code

ocots and others added 4 commits July 28, 2026 00:05
Removes the runner.os != 'Windows' guard on the Add ct-registry step to
test whether julia-actions/add-julia-registry@v2 now works on
windows-latest (the exclusion predates the v1->v2 bump and its reason
was never recorded). Experimental branch, not merged to main yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
windows-latest runners ship the ssh-agent Windows service with
StartupType Disabled, so add-julia-registry's ssh-agent.exe invocation
fails with "unable to start ssh-agent service, error :1058"
(ERROR_SERVICE_DISABLED). Enable it explicitly first.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replaces the Windows-service-enable workaround: add-julia-registry
calls bare ssh-agent/ssh-add/ssh-keyscan (PATH lookup, not a hardcoded
path), which resolves to Windows' System32 OpenSSH port by default.
That port (a) treats a bare ssh-agent invocation as a service start
rather than forking an agent, and (b) is old enough to fail negotiating
GitHub's sntrup761x25519-sha512@openssh.com post-quantum KEX during
ssh-keyscan. Git for Windows ships its own MSYS2-based OpenSSH that
behaves like the Unix tools these actions expect and is already present
on GitHub-hosted Windows runners; prepend it to PATH instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
julia-actions/cache also restores a cached ~/.julia/registries, but
logs "Julia depot registries already exist. Skipping restoring of
cached registries..." whenever a registry-adding step already ran
first, per its own guidance: "Please ensure that julia-actions/cache
precedes any workflow steps which add registries." With Add ct-registry
running first, the (large, ~700MB) General + ct-registry registries
were being freshly git-cloned on every single run instead of ever
being cached — likely the dominant cost of the slow Add ct-registry
step observed on Windows, and probably wasting time on every OS.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ocots
ocots merged commit 534deba into main Jul 28, 2026
@ocots
ocots deleted the fix/windows-ct-registry branch July 28, 2026 06:31
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.

1 participant