Repository navigation
Conversation
go-git v6 stops exporting its vendored copy of github.com/skeema/knownhosts and keeps only the parts its default known_hosts checking needs. The full API moves here so callers can still build a host key callback and look up the host key algorithms known for a host, then set them on go-git's HostKeyCallbackHelper. The code is go-git's copy of skeema/knownhosts v1.3.0 (commit 9485bdec8ed5), with the go-git trace call removed so the module only depends on golang.org/x/crypto. Its tests come along, with shadowed errors and unchecked Close calls fixed. The upstream LICENSE and NOTICE are kept. The ported files are excluded from the style-only linters so they stay comparable with upstream. Correctness linters still run on them. Assisted-by: Claude Opus 5.5 Signed-off-by: Paulo Gomes <paulo@entire.io>
go-git v6 stops exporting its vendored copy of github.com/xanzy/ssh-agent. Its internal default keeps SSH_AUTH_SOCK and the Windows OpenSSH agent pipe, and drops Pageant. The full client moves here. New returns an *Agent that embeds the x/crypto ExtendedAgent and owns the connection to the agent. Close closes it and is safe to call more than once. Upstream returned the connection separately, and returned nil for the Windows named pipe, so the pipe could never be closed. Signers plugs into go-git's PublicKeysCallback, and AuthMethod into a plain ssh.ClientConfig. Errors for a missing agent wrap ErrAgentNotFound. The discovery code comes from go-git's copy of xanzy/ssh-agent v0.3.3 (commit 0fa644ba07f4), with the go-git trace calls removed. The upstream LICENSE and the MIT headers of the Windows files are kept. The Pageant mapping now builds its slice with unsafe.Slice so go vet passes on Windows. go-git has no tests for this code. New tests serve an in-memory keyring over a Unix socket, or a named pipe on Windows, and check the signers, an SSH handshake through AuthMethod, and that Close releases the connection. The existing CI matrix already runs every module on windows-latest. Assisted-by: Claude Opus 5.5 Signed-off-by: Paulo Gomes <paulo@entire.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
ssh/knownhostsandssh/agentmodules: the full known_hosts and SSH agent implementations go-git vendored from skeema/knownhosts and xanzy/ssh-agent, which go-git v6 moves to internal packages trimmed to its defaults. Neither module depends on go-git. The agent module keeps Pageant and the Windows named pipe and returns an*Agentthat owns and closes its connection. Upstream LICENSE files and commits are recorded in each module.Commits: