You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found an issue when the secret for a GitRepository contains a known_hosts file with comments. When using the libgit2 implementation I get the following error:
Which tries for each line in the known_hosts file to parse the entry. But according to the official documentation, the function ParseKnownHosts can return io.EOF
If no entries were found in the input then err will be io.EOF
So I think those errors should be ignored or maybe lines should be scanned for # in them.
Hi,
I found an issue when the secret for a GitRepository contains a known_hosts file with comments. When using the libgit2 implementation I get the following error:
I had the same errors with image-automation-controller which uses the same code.
I was able to track down the issue to
source-controller/pkg/git/libgit2/transport.go
Lines 169 to 172 in 5ccb914
Which tries for each line in the known_hosts file to parse the entry. But according to the official documentation, the function ParseKnownHosts can return io.EOF
So I think those errors should be ignored or maybe lines should be scanned for
#
in them.Here is an example secret that fails.
The text was updated successfully, but these errors were encountered: