Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-ssh: try multiple algorithms for known_hosts #411

Closed
franklouwers opened this issue Nov 17, 2021 · 8 comments · Fixed by #655 or 610lyn/go-git#1
Closed

git-ssh: try multiple algorithms for known_hosts #411

franklouwers opened this issue Nov 17, 2021 · 8 comments · Fixed by #655 or 610lyn/go-git#1

Comments

@franklouwers
Copy link

Hi,

When using git over ssh, it seems that if a host (eg: GitHub.com) has multiple keys (eg: an rsa and an ed25519 ones), but only one of those keys is listed in the $HOME/.ssh/known_hosts, and the one that's not listed has a higher preference (e.g. ed25519 over rsa), then the git clone operation will fail.

I feel it should try to be more intelligent and try to use the rsa one.

@steffakasid
Copy link

I experienced the same. As workaround you could do the following: ssh-keyscan github.com >> known_hosts

@mojotx
Copy link

mojotx commented Dec 16, 2021

I've been struggling for several days, trying to get go-git to work, and I kept thinking it had something to do with ssh-agent, or that I had missed some minor thing in my code.

THIS was the problem, and running ssh-keyscan github.com >> ~/.ssh/known_hosts fixed it for me. Thank you, both @franklouwers and @steffakasid, for helping me fix this issue! 🙂

@mojotx
Copy link

mojotx commented Dec 16, 2021

I did some digging, to see how easy this would be to fix, and I don't think this is an issue in go-git's code

In plumbing/transport/ssh/common.go, in the dial() func, the code is calling ssh.NewClientConn().

	c, chans, reqs, err := ssh.NewClientConn(conn, addr, config)

That function is actually defined in golang/x/crypto/ssh. I didn't follow the rabbit trail all the way down into the crypto code, but I suspect that's where it needs to be fixed.

If I had the time, I would try writing a trivial Go program that makes a SSH connection to Github,, disabling the pseudo-tty allocation, which would be the equivalent of ssh -T git@github.com.

Currently if you do that, and you have your SSH keys set up correctly, it prints something like this:

$ ssh -T git@github.com
Hi mojotx! You've successfully authenticated, but GitHub does not provide shell access.

If a trivial Go implementation of ssh -T git@github.com also gives you the same host-key error, then we know for sure that the problem is in the golang/x/crypto/ssh code.

For what it's worth, I tried forking the go-git repo, and then updating the crypto module, to see if it's been fixed already, and it hasn't.

$ go get -v -u golang.org/x/crypto
go get: upgraded golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 => v0.0.0-20211215153901-e495a2d5b3d3
go get: upgraded golang.org/x/net v0.0.0-20210326060303-6b1517762897 => v0.0.0-20211112202133-69e39bad7dc2
go get: upgraded golang.org/x/text v0.3.3 => v0.3.6

@jaredallard
Copy link

Here's a workaround for ~/.ssh/known_hosts for those running into this:

ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
ssh-keyscan -t ecdsa github.com >> ~/.ssh/known_hosts

This seems to 100% of the time ensure this works. It's kinda confusing.

@rgalanakis
Copy link

@jaredallard and others, thank you for the workarounds!

rm3l added a commit to rm3l/gh-org-repo-sync that referenced this issue Feb 16, 2022
Leverage the standard Git command for such operations,
which should anyways be available for using the GitHub CLI.
There are few issues like [1] with SSH known hosts when using go-git.

[1] go-git/go-git#411
@smveloso
Copy link

smveloso commented Apr 8, 2022

From #411 (comment):

I did some digging, to see how easy this would be to fix, and I don't think this is an issue in go-git's code

It seems that the root cause is indeed in golang's ssh library: golang/go#29286

However, it's possible to work around it in code by explicitly setting the HostKeyAlgorithms field of https://pkg.go.dev/golang.org/x/crypto/ssh#ClientConfig. This was suggested here.

I did try and it works, by hardcoding the ssh key type I actually had in my known_hosts.

I don't know what would be the appropriate way of doing this kind of configuration on go-git. 🤔

NOTE: I'm working on a pull request. You can see the work so far here.

smveloso added a commit to smveloso-lab/go-git that referenced this issue Apr 13, 2022
evanelias added a commit to evanelias/go-git that referenced this issue Jun 20, 2022
…Fixes go-git#411

This commit adjusts the transport/ssh logic in command.connect(), so that it
now auto-populates ssh.ClientConfig.HostKeyAlgorithms. The algorithms are
chosen based on the known host keys for the target host, as obtained from the
known_hosts file.

In order to look-up the algorithms from the known_hosts file, external module
github.com/skeema/knownhosts is used. This package is just a thin wrapper
around golang.org/x/crypto/ssh/knownhosts, adding an extra mechanism to query
the known_hosts keys, implemented in a way which avoids duplication of any
golang.org/x/crypto/ssh/knownhosts logic.

Because HostKeyAlgorithms vary by target host, some related logic for setting
HostKeyCallback has been moved out of the various AuthMethod implementations.
This was necessary because the old HostKeyCallbackHelper is not host-specific.
Since known_hosts handling isn't really tied to AuthMethod anyway, it seems
reasonable to separate these. Previously-exported types/methods remain in
place for backwards compat, but some of them are now unused.

For testing approach, see pull request. Issue go-git#411 can only be reproduced
via end-to-end / integration testing, since it requires actually launching
an SSH connection, in order to see the key mismatch error triggered from
golang/go#29286 as the root cause.
@evanelias
Copy link
Contributor

I've just submitted a new pull request #548 which adds auto-population of ssh.ClientConfig.HostKeyAlgorithms, based on the known_hosts entries for the git remote host. Seems to work properly and solve this issue in my testing :)

@shaftoe
Copy link

shaftoe commented Jun 21, 2022

@evanelias looks great! thanks a lot

rohankmr414 pushed a commit to rohankmr414/go-git that referenced this issue Oct 12, 2022
…Fixes go-git#411

This commit adjusts the transport/ssh logic in command.connect(), so that it
now auto-populates ssh.ClientConfig.HostKeyAlgorithms. The algorithms are
chosen based on the known host keys for the target host, as obtained from the
known_hosts file.

In order to look-up the algorithms from the known_hosts file, external module
github.com/skeema/knownhosts is used. This package is just a thin wrapper
around golang.org/x/crypto/ssh/knownhosts, adding an extra mechanism to query
the known_hosts keys, implemented in a way which avoids duplication of any
golang.org/x/crypto/ssh/knownhosts logic.

Because HostKeyAlgorithms vary by target host, some related logic for setting
HostKeyCallback has been moved out of the various AuthMethod implementations.
This was necessary because the old HostKeyCallbackHelper is not host-specific.
Since known_hosts handling isn't really tied to AuthMethod anyway, it seems
reasonable to separate these. Previously-exported types/methods remain in
place for backwards compat, but some of them are now unused.

For testing approach, see pull request. Issue go-git#411 can only be reproduced
via end-to-end / integration testing, since it requires actually launching
an SSH connection, in order to see the key mismatch error triggered from
golang/go#29286 as the root cause.
gibchikafa pushed a commit to gibchikafa/go-git that referenced this issue Nov 23, 2022
…Fixes go-git#411

This commit adjusts the transport/ssh logic in command.connect(), so that it
now auto-populates ssh.ClientConfig.HostKeyAlgorithms. The algorithms are
chosen based on the known host keys for the target host, as obtained from the
known_hosts file.

In order to look-up the algorithms from the known_hosts file, external module
github.com/skeema/knownhosts is used. This package is just a thin wrapper
around golang.org/x/crypto/ssh/knownhosts, adding an extra mechanism to query
the known_hosts keys, implemented in a way which avoids duplication of any
golang.org/x/crypto/ssh/knownhosts logic.

Because HostKeyAlgorithms vary by target host, some related logic for setting
HostKeyCallback has been moved out of the various AuthMethod implementations.
This was necessary because the old HostKeyCallbackHelper is not host-specific.
Since known_hosts handling isn't really tied to AuthMethod anyway, it seems
reasonable to separate these. Previously-exported types/methods remain in
place for backwards compat, but some of them are now unused.

For testing approach, see pull request. Issue go-git#411 can only be reproduced
via end-to-end / integration testing, since it requires actually launching
an SSH connection, in order to see the key mismatch error triggered from
golang/go#29286 as the root cause.
aymanbagabas added a commit to aymanbagabas/go-git that referenced this issue Jan 9, 2023
Don't overwrite HostKeyCallback if one is provided.

Fixes: c35b808 ("plumbing: transport/ssh, auto-populate ClientConfig.HostKeyAlgorithms. Fixes go-git#411")
Fixes: go-git#654
Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
aymanbagabas added a commit to aymanbagabas/go-git that referenced this issue Mar 5, 2023
Don't overwrite HostKeyCallback if one is provided.

Fixes: c35b808 ("plumbing: transport/ssh, auto-populate ClientConfig.HostKeyAlgorithms. Fixes go-git#411")
Fixes: go-git#654
Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
durandj pushed a commit to durandj/go-git that referenced this issue Jul 1, 2023
…Fixes go-git#411

This commit adjusts the transport/ssh logic in command.connect(), so that it
now auto-populates ssh.ClientConfig.HostKeyAlgorithms. The algorithms are
chosen based on the known host keys for the target host, as obtained from the
known_hosts file.

In order to look-up the algorithms from the known_hosts file, external module
github.com/skeema/knownhosts is used. This package is just a thin wrapper
around golang.org/x/crypto/ssh/knownhosts, adding an extra mechanism to query
the known_hosts keys, implemented in a way which avoids duplication of any
golang.org/x/crypto/ssh/knownhosts logic.

Because HostKeyAlgorithms vary by target host, some related logic for setting
HostKeyCallback has been moved out of the various AuthMethod implementations.
This was necessary because the old HostKeyCallbackHelper is not host-specific.
Since known_hosts handling isn't really tied to AuthMethod anyway, it seems
reasonable to separate these. Previously-exported types/methods remain in
place for backwards compat, but some of them are now unused.

For testing approach, see pull request. Issue go-git#411 can only be reproduced
via end-to-end / integration testing, since it requires actually launching
an SSH connection, in order to see the key mismatch error triggered from
golang/go#29286 as the root cause.
durandj pushed a commit to durandj/go-git that referenced this issue Jul 1, 2023
Don't overwrite HostKeyCallback if one is provided.

Fixes: c35b808 ("plumbing: transport/ssh, auto-populate ClientConfig.HostKeyAlgorithms. Fixes go-git#411")
Fixes: go-git#654
Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
zydou pushed a commit to zydou/tea that referenced this issue Sep 25, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) | require | minor | `v5.4.2` -> `v5.8.1` |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>go-git/go-git (github.com/go-git/go-git/v5)</summary>

### [`v5.8.1`](https://github.com/go-git/go-git/releases/tag/v5.8.1)

[Compare Source](go-git/go-git@v5.8.0...v5.8.1)

#### What's Changed

-   \*: Bump dependencies by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#815

**Full Changelog**: go-git/go-git@v5.8.0...v5.8.1

### [`v5.8.0`](https://github.com/go-git/go-git/releases/tag/v5.8.0)

[Compare Source](go-git/go-git@v5.7.0...v5.8.0)

#### What's Changed

-   git: Fix fetching after shallow clone. Fixes [#&#8203;305](go-git/go-git#305) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#778
-   git: enable fetch with unqualified references by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#762
-   git: don't add to want if exists, shallow and depth 1 by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#763
-   git: Clone HEAD should not force master. Fixes [#&#8203;363](go-git/go-git#363) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#758
-   git: fix the issue with submodules having the SCP style URL fail due to the wrong URL parsing by [@&#8203;matejrisek](https://github.com/matejrisek) in go-git/go-git#756
-   git: add a clone option to allow for shallow cloning of submodules by [@&#8203;matejrisek](https://github.com/matejrisek) in go-git/go-git#765
-   worktree: minor speedup for `doAddDirectory` by [@&#8203;ThinkChaos](https://github.com/ThinkChaos) in go-git/go-git#702
-   \_examples: Remove wrong comment by [@&#8203;pascal-hofmann](https://github.com/pascal-hofmann) in go-git/go-git#357
-   \*: Handle paths starting with tilde by [@&#8203;ricci2511](https://github.com/ricci2511) in go-git/go-git#808
-   \*: Handle paths starting with ~Username by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#809
-   storage: filesystem/dotgit, add support for tmp_objdir prefix by [@&#8203;L11R](https://github.com/L11R) in go-git/go-git#812
-   plumbing: gitignore, replace user dir in path by [@&#8203;Jleagle](https://github.com/Jleagle) in go-git/go-git#772
-   plumbing: gitignore, fix incorrect parsing. Fixes [#&#8203;500](go-git/go-git#500) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#781
-   plumbing: http, Fix empty repos on Git v2.41+ by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#802
-   plumbing: packp, A request is not empty if it contains shallows. Fixes [#&#8203;328](go-git/go-git#328) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#792
-   plumbing: blame, Complete rewrite. Fixes [#&#8203;603](go-git/go-git#603) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#789
-   plumbing: gitignore, Allow gitconfig to contain a gitignore relative to any user home. Fixes [#&#8203;578](go-git/go-git#578) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#785

#### New Contributors

-   [@&#8203;Jleagle](https://github.com/Jleagle) made their first contribution in go-git/go-git#772
-   [@&#8203;pascal-hofmann](https://github.com/pascal-hofmann) made their first contribution in go-git/go-git#357
-   [@&#8203;ricci2511](https://github.com/ricci2511) made their first contribution in go-git/go-git#808
-   [@&#8203;L11R](https://github.com/L11R) made their first contribution in go-git/go-git#812

**Full Changelog**: go-git/go-git@v5.7.0...v5.7.1

### [`v5.7.0`](https://github.com/go-git/go-git/releases/tag/v5.7.0)

[Compare Source](go-git/go-git@v5.6.1...v5.7.0)

#### What's Changed

-   \*: Add support for initializing SHA256 repositories by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#707
-   git: add mirror clone option by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#735
-   git: Add support to ls-remote with peeled references. Fixes [#&#8203;749](go-git/go-git#749) by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#750
-   git: fix cloning with branch name by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#755
-   git: Worktree, add check to see if file already checked in. Fixes [#&#8203;718](go-git/go-git#718) by [@&#8203;cbbm142](https://github.com/cbbm142) in go-git/go-git#719
-   git: Worktree, git grep bare repositories by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#728
-   git: Add Depth to SubmoduleUpdateOptions by [@&#8203;matejrisek](https://github.com/matejrisek) in go-git/go-git#754
-   git: Testing, Fix tests not cleaning temp folders by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#769
-   git: remote, add support for a configurable timeout. by [@&#8203;andrewpollock](https://github.com/andrewpollock) in go-git/go-git#753
-   git: Allow Initial Branch to be configurable by [@&#8203;techknowlogick](https://github.com/techknowlogick) in go-git/go-git#764
-   storage: filesystem/dotgit, Improve load packed-refs by [@&#8203;fcharlie](https://github.com/fcharlie) in go-git/go-git#743
-   storage: filesystem, Populate index before use. Fixes [#&#8203;148](go-git/go-git#148) by [@&#8203;AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#722
-   plumbing: resolve non-external delta references by [@&#8203;ZauberNerd](https://github.com/ZauberNerd) in go-git/go-git#485
-   plumbing/transport: fix regression in scp-like match by [@&#8203;jotadrilo](https://github.com/jotadrilo) in go-git/go-git#715
-   plumbing/transport: Add support for custom proxy settings by [@&#8203;aryan9600](https://github.com/aryan9600) in go-git/go-git#744
-   \*: small fixes across the codebase by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#770
-   \*: bump github.com/cloudflare/circl from 1.1.0 to 1.3.3 by [@&#8203;dependabot](https://github.com/dependabot) in go-git/go-git#776
-   \*: bump dependencies by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#748
-   \*: bump Go version to 1.18 on go.mod by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#774
-   \*: add Codeql workflow and bump dependencies by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#775
-   ci: fix upstream git build for master branch by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#739

#### New Contributors

-   [@&#8203;ZauberNerd](https://github.com/ZauberNerd) made their first contribution in go-git/go-git#485
-   [@&#8203;jotadrilo](https://github.com/jotadrilo) made their first contribution in go-git/go-git#715
-   [@&#8203;fcharlie](https://github.com/fcharlie) made their first contribution in go-git/go-git#743
-   [@&#8203;AriehSchneier](https://github.com/AriehSchneier) made their first contribution in go-git/go-git#755
-   [@&#8203;cbbm142](https://github.com/cbbm142) made their first contribution in go-git/go-git#719
-   [@&#8203;aryan9600](https://github.com/aryan9600) made their first contribution in go-git/go-git#744
-   [@&#8203;matejrisek](https://github.com/matejrisek) made their first contribution in go-git/go-git#754
-   [@&#8203;andrewpollock](https://github.com/andrewpollock) made their first contribution in go-git/go-git#753
-   [@&#8203;techknowlogick](https://github.com/techknowlogick) made their first contribution in go-git/go-git#764

**Full Changelog**: go-git/go-git@v5.6.1...v5.7.0

### [`v5.6.1`](https://github.com/go-git/go-git/releases/tag/v5.6.1)

[Compare Source](go-git/go-git@v5.6.0...v5.6.1)

#### What's Changed

-   plumbing/transport: don't use the `firstErrLine` when it is empty by [@&#8203;ThinkChaos](https://github.com/ThinkChaos) in go-git/go-git#682
-   plumbing/transport: ssh, unable to pass a custom HostKeyCallback func by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#655
-   storage/filesystem: dotgit: fix a filesystem race in Refs/walkReferencesTree by [@&#8203;MichaelMure](https://github.com/MichaelMure) in go-git/go-git#659
-   \*: bump golang.org/x/net from 0.2.0 to 0.7.0 by [@&#8203;dependabot](https://github.com/dependabot) in go-git/go-git#684
-   \*: bump dependencies by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#697
-   \*: fix panic for empty revisions by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#696
-   ci: bump GitHub actions, enable go test race detection and stop using developer's GPG keys during test execution by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#701

**Full Changelog**: go-git/go-git@v5.6.0...v5.6.1

### [`v5.6.0`](https://github.com/go-git/go-git/releases/tag/v5.6.0)

[Compare Source](go-git/go-git@v5.5.2...v5.6.0)

#### What's Changed

-   Worktree, check for empty parent dirs during Reset (Fixes [#&#8203;670](go-git/go-git#670)) by [@&#8203;mbohy](https://github.com/mbohy) in go-git/go-git#671
-   \*: remove need to build with CGO by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#688
-   plumbing: support SSH/X509 signed tags by [@&#8203;hiddeco](https://github.com/hiddeco) in go-git/go-git#690

**Full Changelog**: go-git/go-git@v5.5.2...v5.6.0

### [`v5.5.2`](https://github.com/go-git/go-git/releases/tag/v5.5.2)

[Compare Source](go-git/go-git@v5.5.1...v5.5.2)

#### What's Changed

-   \*: update go-billy v5.4.0, removes data races. Fixes [#&#8203;629](go-git/go-git#629) by [@&#8203;mcuadros](https://github.com/mcuadros) in go-git/go-git#653
-   Worktree: Add, fix add removed files. Fixes [#&#8203;223](go-git/go-git#223) by [@&#8203;tfujiwar](https://github.com/tfujiwar) in go-git/go-git#652

**Full Changelog**: go-git/go-git@v5.5.1...v5.5.2

### [`v5.5.1`](https://github.com/go-git/go-git/releases/tag/v5.5.1)

[Compare Source](go-git/go-git@v5.5.0...v5.5.1)

#### What's Changed

-   \*: fix error when building with `CGO_ENABLED=0` by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#625
-   plumbing: transport/ssh: fix panic on Windows 10 with paegent as ssh-agent by [@&#8203;doxsch](https://github.com/doxsch) in go-git/go-git#617
-   CommitOptions: AllowEmptyCommits, return an error instead of creating empty commits by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#623

**Full Changelog**: go-git/go-git@v5.5.0...v5.5.1

### [`v5.5.0`](https://github.com/go-git/go-git/releases/tag/v5.5.0)

[Compare Source](go-git/go-git@v5.4.2...v5.5.0)

#### What's Changed

-   \*: add collision resistent SHA1 implementation by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#618
-   \*: replace go-homedir with os.UserHomeDir by [@&#8203;mvdan](https://github.com/mvdan) in go-git/go-git#535
-   Remote: add RemoteURL to {Fetch,Pull,Push}Options by [@&#8203;noerw](https://github.com/noerw) in go-git/go-git#375
-   Remote: Push, add support to push commits per hashes by [@&#8203;tjamet](https://github.com/tjamet) in go-git/go-git#325
-   Remote: Push, add ForceWithLease Push Option by [@&#8203;john-cai](https://github.com/john-cai) in go-git/go-git#404
-   Remote: PushOptions add push-options by [@&#8203;S-Bohn](https://github.com/S-Bohn) in go-git/go-git#399
-   Remote: Push, add atomic to push options by [@&#8203;john-cai](https://github.com/john-cai) in go-git/go-git#406
-   Remote: add FollowTags option for pushes by [@&#8203;john-cai](https://github.com/john-cai) in go-git/go-git#385
-   Worktree: use syscall.Timespec.Unix by [@&#8203;tklauser](https://github.com/tklauser) in go-git/go-git#437
-   Worktree: Checkout, simplified sparse checkout by [@&#8203;john-cai](https://github.com/john-cai) in go-git/go-git#410
-   Repository: don't crash accessing invalid pathinfo by [@&#8203;muesli](https://github.com/muesli) in go-git/go-git#443
-   storage: filesystem, switch from os.SEEK_\* to io.Seek\* by [@&#8203;abhinav](https://github.com/abhinav) in go-git/go-git#421
-   config: add branch description support by [@&#8203;ninedraft](https://github.com/ninedraft) in go-git/go-git#409
-   revision: fix endless looping in revision parser by [@&#8203;michenriksen](https://github.com/michenriksen) in go-git/go-git#475
-   pumbling: optimise zlib reader and consolidate sync.Pools by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#608
-   pumbling: parse optimisations by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#602
-   plumbing: object, rename calculation uses too much memory by [@&#8203;jfontan](https://github.com/jfontan) in go-git/go-git#503
-   plumbing: protocol/pakp and server, include the contents of `GO_GIT_USER_AGENT_EXTRA`. Fixes [#&#8203;529](go-git/go-git#529) by [@&#8203;stewing](https://github.com/stewing) in go-git/go-git#531
-   plumbing: protocol/pakp, avoid duplicate encoding when overriding a Capability value. by [@&#8203;tylerchr](https://github.com/tylerchr) in go-git/go-git#521
-   plumbing: protocol/pakp, update agent by [@&#8203;caarlos0](https://github.com/caarlos0) in go-git/go-git#453
-   plumbing: protocol/pakp: Actions should have type Action by [@&#8203;abhinav](https://github.com/abhinav) in go-git/go-git#420
-   plumbing: protocol/pakp: allow unsupported `multi_ack` capability by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#613
-   plumbing: transport/ssh, auto-populate HostKeyAlgorithms. Fixes [#&#8203;411](go-git/go-git#411) by [@&#8203;evanelias](https://github.com/evanelias) in go-git/go-git#548
-   pumbling: format/packfile, resolve external reference delta by [@&#8203;ga-paul-t](https://github.com/ga-paul-t) in go-git/go-git#392
-   plumbing: format/packfile, prevent large objects from being read into memory completely by [@&#8203;zeripath](https://github.com/zeripath) in go-git/go-git#330
-   plumbing: format/index, support v3 index by [@&#8203;john-cai](https://github.com/john-cai) in go-git/go-git#407
-   plumbing: format/gitignore, Read .git/info/exclude file too. by [@&#8203;enisdenjo](https://github.com/enisdenjo) in go-git/go-git#402
-   plumbing: format/gitattributes, Avoid index out of range  by [@&#8203;To1ne](https://github.com/To1ne) in go-git/go-git#598
-   plumbing: format/config, Branch name with hash can be cloned. Fixes [#&#8203;309](go-git/go-git#309) by [@&#8203;dowy](https://github.com/dowy) in go-git/go-git#354
-   go.mod: update github.com/xanzy/ssh-agent to v0.3.1 by [@&#8203;tklauser](https://github.com/tklauser) in go-git/go-git#403
-   go.mod: update dependencies to remove supply chain CVEs by [@&#8203;pjbgf](https://github.com/pjbgf) in go-git/go-git#620
-   examples: added "tag find if head is tagged" by [@&#8203;snebel29](https://github.com/snebel29) in go-git/go-git#374
-   examples: remote fix typo by [@&#8203;nep-0](https://github.com/nep-0) in go-git/go-git#408

**Full Changelog**: go-git/go-git@v5.4.2...v5.5.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi43OS4xIiwidXBkYXRlZEluVmVyIjoiMzYuNzkuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Reviewed-on: https://gitea.com/gitea/tea/pulls/578
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants