GitVersion
GitVersion copied to clipboard
LibGit2Sharp.LibGit2SharpException: the SSL certificate is invalid
Description
Below command is failing on Gitlab /tools/dotnet-gitversion /url $CI_REPOSITORY_URL /b $CI_COMMIT_REF_NAME /c $CI_COMMIT_SHA /verbosity Verbose
Inner exeption
INFO [04/13/22 11:57:18:92] Applicable build agent found: 'GitLabCi'.
INFO [04/13/22 11:57:18:95] Working directory: /[removed]
INFO [04/13/22 11:57:18:95] Branch from build environment: main
INFO [04/13/22 11:57:18:95] Project root is:[removed]
INFO [04/13/22 11:57:18:95] DotGit directory is: /tmp/[removed]/.git
INFO [04/13/22 11:57:18:95] Begin: Creating dynamic repository at '/tmp/[removed]/.git'
INFO [04/13/22 11:57:18:95] Begin: Cloning repository from url '[removed]'
INFO [04/13/22 11:57:19:00] End: Cloning repository from url '[removed]' (Took: 49.83ms)
INFO [04/13/22 11:57:19:00] End: Creating dynamic repository at '/tmp/[removed]/.git' (Took: 50.34ms)
ERROR [04/13/22 11:57:19:01] An unexpected error occurred:
System.Exception: There was an unknown problem with the Git repository you provided
---> LibGit2Sharp.LibGit2SharpException: the SSL certificate is invalid
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 154
at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 172
at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts) in /_/LibGit2Sharp/Core/Proxy.cs:line 275
at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options) in /_/LibGit2Sharp/Repository.cs:line 793
at GitVersion.GitRepository.Clone(String sourceUrl, String workdirPath, AuthenticationInfo auth) in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\Git\GitRepository.cs:line 169
--- End of inner exception stack trace ---
at GitVersion.GitRepository.Clone(String sourceUrl, String workdirPath, AuthenticationInfo auth) in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\Git\GitRepository.cs:line 192
at GitVersion.GitPreparer.<>c__DisplayClass19_0.<CloneRepository>b__0() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 152
at GitVersion.Helpers.RetryAction`1.<>c__DisplayClass1_0.<Execute>b__0() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 16
at Polly.Policy`1.<>c__DisplayClass11_0.<Execute>b__0(Context _, CancellationToken _)
at Polly.Retry.RetryEngine.Implementation[TResult](Func`3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Action`4 onRetry, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider)
at Polly.Retry.RetryPolicy`1.Implementation(Func`3 action, Context context, CancellationToken cancellationToken)
at Polly.Policy`1.Execute(Func`3 action, Context context, CancellationToken cancellationToken)
at Polly.Policy`1.Execute(Func`1 action)
at GitVersion.Helpers.RetryAction`2.Execute(Func`1 operation) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 35
at GitVersion.Helpers.RetryAction`1.Execute(Action operation) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 14
at GitVersion.GitPreparer.CloneRepository(String repositoryUrl, String gitDirectory, AuthenticationInfo auth) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 152
at GitVersion.GitPreparer.CreateDynamicRepository(String targetBranch) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 129
at GitVersion.GitPreparer.PrepareInternal(Boolean normalizeGitDirectory, String currentBranch, Boolean shouldCleanUpRemotes) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 67
at GitVersion.GitPreparer.Prepare() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 59
at GitVersion.GitVersionCalculateTool.CalculateVersionVariables() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitVersionCalculateTool.cs:line 43
at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.App\GitVersionExecutor.cs:line 66
@E4M9i can you please go back and fill out the issue using the template provided? In order to help you, we are going to need as much information as you can provide. Thanks
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs.
This issue was closed because it has been stalled for 30 days with no activity. Thank you for your contributions