Skip to content

docs: Describe v6 SSH host key and agent defaults - #13

Open
pjbgf wants to merge 1 commit into
mainfrom
v6-ssh-defaults
Open

pjbgf wants to merge 1 commit into
mainfrom
v6-ssh-defaults

Conversation

@pjbgf

@pjbgf pjbgf commented Nov 19, 2026

Copy link
Copy Markdown
Member

Describes go-git/go-git#2641, go-git/go-git#2622 and go-git/go-git#2620, and go-git/x#15. Marked as planned until those merge.

go-git v6 stops exporting its vendored copies of skeema/knownhosts and xanzy/ssh-agent. They move to the github.com/go-git/x/ssh/knownhosts and github.com/go-git/x/ssh/agent modules, and the default agent lookup no longer detects Pageant on Windows.

Add a migration section covering the replacement imports, the defaults that stay (known_hosts checking with algorithms taken from known_hosts, the agent through SSH_AUTH_SOCK or the Windows OpenSSH pipe), using the x agent module for Pageant, caller-supplied host key callbacks with HostKeyAlgorithms, and closing the value returned by NewSSHAgentAuth.

Update the SSH trace sample in the troubleshooting guide for the v6 file names and the single known_hosts load, and remove a stray code fence that swallowed the "SSH Connection Issues" heading.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 03:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

go-git v6 removes the plumbing/transport/ssh/knownhosts and
plumbing/transport/ssh/sshagent packages, the vendored copies of
skeema/knownhosts and xanzy/ssh-agent found in v6 pre-releases. go-git
now uses the github.com/go-git/x/ssh/knownhosts module for known_hosts
and a small internal agent client, which no longer detects Pageant on
Windows. The full agent client lives in github.com/go-git/x/ssh/agent.

Add a migration section covering why go-git carries no third-party
copies, the replacement imports and how to get the modules (the
knownhosts module is already a go-git dependency), the defaults that
stay (known_hosts checking with algorithms taken from known_hosts, the
agent through SSH_AUTH_SOCK or the Windows OpenSSH pipe), using the x
agent module for Pageant, caller-supplied host key callbacks with
HostKeyAlgorithms, and closing the value returned by NewSSHAgentAuth.
The section also says that knownhosts.NewDB, unlike v5's
NewKnownHostsDb, reads only the files it is given, and shows how to
keep the v5 default lookup. The quick migration checklist gains the
matching items.

Update the SSH trace sample in the troubleshooting guide for the v6
file names and the single known_hosts load, and remove a stray code
fence that swallowed the "SSH Connection Issues" heading.

Assisted-by: Claude Opus 5.5
Signed-off-by: Paulo Gomes <paulo@entire.io>

This branch has not been deployed

No deployments
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.

2 participants