Skip to content

Conversation

@zhming0
Copy link
Contributor

@zhming0 zhming0 commented Jan 21, 2026

Description

Simplifies SSH host key verification by using OpenSSH's StrictHostKeyChecking=accept-new option instead of running ssh-keyscan before git operations.

  • Set GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=accept-new" when SSHKeyscan is enabled
  • Removed ssh-keyscan invocations and known_hosts file manipulation
  • Deleted ssh.go, knownhosts.go and their tests (~450 lines removed)

The new approach is important reducing our reliance on Git binary, making it slightly easier for my subsequent git abstraction PR.

  • Eliminates dependency on ssh-keyscan binary
  • Removes Windows-specific path hackery to find SSH tools bundled with Git
  • Simpler, fewer moving parts

One important note is this PR raises our minimum SSH version requirement to ~2017. You can vote yes or no 🙂 .

Context

part of PB-1068

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go tool gofumpt -extra -w .)

Disclosures / Credits

LLM powered this time

@zhming0 zhming0 requested a review from a team January 21, 2026 05:20
@zhming0 zhming0 force-pushed the ming/pb-1068-refactor-1 branch from f35f648 to 364c5fa Compare January 22, 2026 02:29
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