source-controller/pkg/git/libgit2
Hidde Beydals 99428f593e libgit2: change credentialsCallback logic
This changes the logic of `credentialsCallback` so that it takes the
`allowedTypes` passed on by `git2go` into account. Reason for this
change is because this prepares it to work with `v33`, but also
because it can provide better guidance when `libgit2` has been
compiled with a different configuration, which e.g. doesn't
allow for "in-memory SSH keys".

Because `AuthOptions#Identity` now gets validated by the callback
and go-git does its own validaiton, the check has been removed
from `Validate` (and now does a simple check if the fields are set).

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-10-27 00:43:31 +05:30
..
checkout.go git: styling nitpicks 2021-10-27 00:43:31 +05:30
checkout_test.go gogit: allow checkout of commit without branch 2021-10-27 00:43:31 +05:30
libgit2.go gogit: allow checkout of commit without branch 2021-10-27 00:43:31 +05:30
transport.go libgit2: change credentialsCallback logic 2021-10-27 00:43:31 +05:30
transport_test.go git: styling nitpicks 2021-10-27 00:43:31 +05:30