source-controller/pkg/git
Hidde Beydals 67b10aad22 Respect configured user in SSH Git repository URL
We had a hardcoded assumption that the SSH user for a Git repository is
always "git". This is however not true in all scenarios, for example
when one is making use of Gerrit for team code collaboration, as users
there have their own username for (SSH) Git operations.

This commit changes the logic of the auth strategy helpers to:

1. Select the auth strategy based on the protocol of the parsed URL,
   instead of a simple rely on a correct prefix.
2. Use the user information from the parsed URL to configure the user
   for the public key authentication strategy, with a fallback to `git`
   if none is defined.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-11-30 16:26:23 +01:00
..
checkout.go Switch to Masterminds/semver and pkg/version libs 2020-10-28 12:21:08 +01:00
checkout_test.go Fix Git semver checkout 2020-08-18 11:32:42 +03:00
transport.go Respect configured user in SSH Git repository URL 2020-11-30 16:26:23 +01:00
transport_test.go Respect configured user in SSH Git repository URL 2020-11-30 16:26:23 +01:00