Update LibGit2Sharp and add ssh credentials for git#1917
Open
eddymoulton wants to merge 56 commits into
Open
Conversation
# Conflicts: # source/Calamari.Tests/ArgoCD/Git/GitHttpSmartSubTransportTests.cs
# Conflicts: # source/Calamari.Tests/ArgoCD/Git/RepositoryWrapperTest.cs
# Conflicts: # source/Calamari/CommitToGit/CommitToGitConfigFactory.cs
# Conflicts: # source/Calamari/CommitToGit/CommitToGitConfigFactory.cs
…enssl1.1-handling # Conflicts: # source/Calamari.Common/Plumbing/Variables/CustomPropertiesLoader.cs # source/Calamari.Contracts/ArgoCD/ArgoCDCustomPropertiesDto.cs # source/Calamari.Tests/ArgoCD/Contracts/ArgoCDCustomPropertiesDtoSerializationTests.cs # source/Calamari.Tests/ArgoCD/Git/AuthenticatingRepositoryFactoryTests.cs # source/Calamari.Tests/ArgoCD/Git/GitCloneSafeUrlTests.cs # source/Calamari.Tests/ArgoCD/Git/PullRequests/GitPullRequestClientResolverTests.cs # source/Calamari.Tests/CommitToGit/CommitToGitConfigFactoryTests.cs # source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs # source/Calamari/ArgoCD/Conventions/UpdateArgoCDApplicationManifestsInstallConvention.cs # source/Calamari/ArgoCD/Git/AuthenticatingRepositoryFactory.cs # source/Calamari/ArgoCD/Git/GitCloneSafeUrl.cs # source/Calamari/ArgoCD/Git/GitConnection.cs # source/Calamari/ArgoCD/Git/IGitCredentialDtoJsonConverter.cs # source/Calamari/ArgoCD/Git/PullRequests/GitVendorPullRequestClientResolver.cs # source/Calamari/ArgoCD/Git/PullRequests/StringExtensionMethods.cs # source/Calamari/ArgoCD/Git/PullRequests/Vendors/AzureDevOps/AzureDevOpsPullRequestClient.cs # source/Calamari/ArgoCD/Git/PullRequests/Vendors/BitBucket/BitBucketPullRequestClient.cs # source/Calamari/ArgoCD/Git/PullRequests/Vendors/GitHub/GitHubPullRequestClient.cs # source/Calamari/ArgoCD/Git/PullRequests/Vendors/GitLab/GitLabPullRequestClient.cs # source/Calamari/ArgoCD/Git/PullRequests/Vendors/GitLab/GitLabPullRequestClientFactory.cs # source/Calamari/ArgoCD/Git/RepositoryFactory.cs # source/Calamari/ArgoCD/Git/RepositoryWrapper.cs # source/Calamari/CommitToGit/CommitToGitConfigFactory.cs
# Conflicts: # source/Calamari.Contracts/ArgoCD/ArgoCDCustomPropertiesDto.cs # source/Calamari.Tests/ArgoCD/Contracts/ArgoCDCustomPropertiesDtoSerializationTests.cs # source/Calamari.Tests/ArgoCD/Git/AuthenticatingRepositoryFactoryTests.cs # source/Calamari/ArgoCD/Git/AuthenticatingRepositoryFactory.cs # source/Calamari/ArgoCD/Git/GitConnection.cs # source/Calamari/ArgoCD/Git/IGitCredentialDtoJsonConverter.cs # source/Calamari/ArgoCD/Git/PullRequests/GitVendorPullRequestClientResolver.cs # source/Calamari/ArgoCD/Git/PullRequests/StringExtensionMethods.cs # source/Calamari/ArgoCD/Git/RepositoryFactory.cs # source/Calamari/ArgoCD/Git/RepositoryWrapper.cs
eddymoulton
commented
May 15, 2026
|
|
||
| internal static class SshHostKeyVerificationBypass | ||
| { | ||
| // TODO(eddy): Implement proper host key verification |
eddymoulton
commented
May 15, 2026
| using var temporaryFolder = TemporaryDirectory.Create(); | ||
|
|
||
| CredentialsHandler credentialsHandler = (url, usernameFromUrl, types) => new UsernamePasswordCredentials { Username = cloneUsername, Password = clonePassword}; | ||
| LibGit2SharpTransportRegistration.EnsureRegistered(); |
Contributor
Author
There was a problem hiding this comment.
We enter git usage in a few weird places in the tests, so for now I've just called this method so we get decent errors if the test runner doesn't meet the dependencies.
Normally this gets done in the repo wrapper and it's a bit cleaner.
# Conflicts: # source/Calamari.Contracts/ArgoCD/ArgoCDCustomPropertiesDto.cs # source/Calamari.Contracts/Git/GitCredentials.cs
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.
I'll get some docs published before this merges so on the off chance someone is running Argo steps on some old version, support can point to it.
Adds support for SSH credentials when using git, but does not use them until Server gets the same treatment.
We don't have known host support yet, I'm going to do that separately for PR conciseness. In the meantime, we accept all hosts.
Closes MD-1680
How to review this PR
The SSH specific changes should be code reviewed, but we can do the full testing of that from server side once that work goes in (it will be easier that way, and we can make follow up fixes to Calamari if required).
For this specific PR the bits to confirm are whether we introduce any regressions to our libgit usage - which is currently used for Argo steps only. We'll want to double check this on mac (for devs), windows and a tentacle target.