Skip to content

[Bug]Unexpected Error, worked before 5.10.0 #3087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sanjivpurohit opened this issue Apr 14, 2022 · 1 comment
Closed

[Bug]Unexpected Error, worked before 5.10.0 #3087

sanjivpurohit opened this issue Apr 14, 2022 · 1 comment
Labels

Comments

@sanjivpurohit
Copy link

Describe the bug
Worked with release prior to 5.10.0
Run dotnet-gitversion on a branch locally or remote, created from master branch.
Run /opt/hostedtoolcache/GitVersion.Tool/5.10.0/x64/dotnet-gitversion ./esp /output json /output buildserver

An unexpected error occurred:
LibGit2Sharp.LibGit2SharpException: this remote has never connected
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in //LibGit2Sharp/Core/Ensure.cs:line 154
at LibGit2Sharp.Core.Proxy.git_remote_ls(Repository repository, RemoteHandle remote) in /
/LibGit2Sharp/Core/Proxy.cs:line 2324
at LibGit2Sharp.Network.ListReferencesInternal(String url, CredentialsHandler credentialsProvider) in //LibGit2Sharp/Network.cs:line 130
at LibGit2Sharp.Network.ListReferences(Remote remote) in /
/LibGit2Sharp/Network.cs:line 55
at GitVersion.GitRepository.GetPullRequestReference(AuthenticationInfo auth, Remote remote, String headTipSha) in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\Git\GitRepository.cs:line 151
at GitVersion.GitRepository.<>c__DisplayClass28_0.b__0() in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\Git\GitRepository.cs:line 79
at GitVersion.RepositoryExtensions.RunSafe(Action operation) in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\RepositoryExtensions.cs:line 15
at GitVersion.GitRepository.CreateBranchForPullRequestBranch(AuthenticationInfo auth) in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\Git\GitRepository.cs:line 69
at GitVersion.GitPreparer.<>c__DisplayClass18_0.b__3() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 237
at GitVersion.Helpers.RetryAction1.<>c__DisplayClass1_0.<Execute>b__0() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 16 at Polly.Policy1.<>c__DisplayClass11_0.b__0(Context _, CancellationToken _)
at Polly.Retry.RetryEngine.Implementation[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Action4 onRetry, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider) at Polly.Retry.RetryPolicy1.Implementation(Func3 action, Context context, CancellationToken cancellationToken) at Polly.Policy1.Execute(Func3 action, Context context, CancellationToken cancellationToken) at Polly.Policy1.Execute(Func1 action) at GitVersion.Helpers.RetryAction2.Execute(Func1 operation) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 35 at GitVersion.Helpers.RetryAction1.Execute(Action operation) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 14
at GitVersion.GitPreparer.EnsureHeadIsAttachedToBranch(String currentBranchName, AuthenticationInfo authentication) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 237
at GitVersion.GitPreparer.NormalizeGitDirectory(Boolean noFetch, String currentBranchName, Boolean isDynamicRepository) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 183
at GitVersion.GitPreparer.NormalizeGitDirectory(String targetBranch, Boolean isDynamicRepository) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 134
at GitVersion.GitPreparer.PrepareInternal(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 69
at GitVersion.GitPreparer.Prepare() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 48
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
INFO [04/14/22 18:40:29:08] Attempting to show the current git graph (please include in issue):
INFO [04/14/22 18:40:29:08] Showing max of 100 commits

Expected Behavior

Gitversion does not throw unexpected error and generates version, worked before 5.10.0 release.

Actual Behavior

Generate Gitversion.

Possible Fix

Steps to Reproduce

Run dotnet-gitversion on a branch locally or remote, created from master branch.

Context

Build System is broken on github and Team wants to move away from gitversion.

Your Environment

  • Version Used:
  • Operating System and version (Windows 10, Ubuntu 18.04): Ubuntu 18.04
  • Gitversion - 5.10.0(Latest Release)
@arturcic
Copy link
Member

@sanjivpurohit please check version 5.10.1
closed by #3085

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants