Skip to content

fix(git-clone): scan custom SSH ports - #1093

Open
35C4n0r wants to merge 1 commit into
coder:mainfrom
35C4n0r:35C4n0r/fix-git-clone-ssh-port
Open

fix(git-clone): scan custom SSH ports#1093
35C4n0r wants to merge 1 commit into
coder:mainfrom
35C4n0r:35C4n0r/fix-git-clone-ssh-port

Conversation

@35C4n0r

@35C4n0r 35C4n0r commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

The git-clone module scanned SSH host keys on port 22 even when an ssh:// repository URL specified a custom port, causing host-key verification to fail for self-hosted Git services on ports such as 2222.

Parse the host and port from ssh:// URLs, use the port-specific [host]:port identity for known-host lookups, and pass the port to ssh-keyscan. Preserve scp-style URL behavior and add regression coverage for custom-port and existing-key cases.

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder/modules/git-clone
New version: v2.0.4
Breaking change: [ ] Yes [x] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun fmt)
  • Changes tested locally

Related Issues

Fixes #1073


Generated by Coder Agents for @35C4n0r.

@35C4n0r
35C4n0r marked this pull request as ready for review September 3, 2026 18:02
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.

bug: git-clone did not parse and add port to ssh-keyscan command

1 participant