Skip to content

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

Merged
DevelopmentCats merged 3 commits into
coder:mainfrom
35C4n0r:35C4n0r/fix-git-clone-ssh-port
Sep 24, 2026
Merged

DevelopmentCats merged 3 commits into
coder:mainfrom
35C4n0r:35C4n0r/fix-git-clone-ssh-port

Conversation

@35C4n0r

@35C4n0r 35C4n0r commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

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.5
Breaking change: [ ] Yes [x] No

Testing & Validation

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

Related Issues

Fixes #1073
Fixes REG-93


Generated by Coder Agents for @35C4n0r.

@35C4n0r
35C4n0r marked this pull request as ready for review September 3, 2026 18:02
@DevelopmentCats
DevelopmentCats self-requested a review September 16, 2026 13:43
@35C4n0r
35C4n0r requested a review from Edd88-pixel September 24, 2026 16:05
@35C4n0r 35C4n0r self-assigned this Sep 24, 2026
@DevelopmentCats

Copy link
Copy Markdown
Collaborator

@35C4n0r The TF Tests are failing so if you can resolve that we are good but other that that I tested and everything works fine

@35C4n0r

35C4n0r commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

@35C4n0r The TF Tests are failing so if you can resolve that we are good but other that that I tested and everything works fine

@DevelopmentCats transient error, re-ran the tests and everything passes now.

@DevelopmentCats

Copy link
Copy Markdown
Collaborator

@35C4n0r The TF Tests are failing so if you can resolve that we are good but other that that I tested and everything works fine

@DevelopmentCats transient error, re-ran the tests and everything passes now.

Yeah I was looking at it and just came to the same conclusion approving now

@DevelopmentCats DevelopmentCats left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait @35C4n0r You need to bump the version

@DevelopmentCats DevelopmentCats added version:minor Add to PRs requiring a minor version upgrade version:patch Add to PRs requiring a patch version upgrade and removed version:minor Add to PRs requiring a minor version upgrade labels Sep 24, 2026
@35C4n0r

35C4n0r commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

intresting

@DevelopmentCats

Copy link
Copy Markdown
Collaborator

You know what I think there may be an unreleased PR for git-clone let me look into it

@DevelopmentCats

Copy link
Copy Markdown
Collaborator

Yep it was #1127

@35C4n0r

35C4n0r commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

version bump done.

@DevelopmentCats
DevelopmentCats merged commit ed42ec7 into coder:main Sep 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version:patch Add to PRs requiring a patch version upgrade

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

2 participants