Skip to content

[Bug] LibGit2Sharp.LibGit2SharpException: this remote has never connected after updating to 5.10.0 #3082

Closed
@IBlackI

Description

@IBlackI

Describe the bug
Gitversion execute throws a LibGit2Sharp.LibGit2SharpException after updating to version 5.10.0

Expected Behavior

GitVersion should be able to determine the correct version as when it was running 5.9.0
Logs have been stripped of sensitive information, and shortened.
Logs with 5.9.0:

2022-04-14T09:21:18.0677229Z ##[section]Starting: gitversionexecute
2022-04-14T09:21:18.0965352Z ==============================================================================
2022-04-14T09:21:18.0965732Z Task         : Execute GitVersion Task
2022-04-14T09:21:18.0966103Z Description  : Easy Semantic Versioning (http://semver.org) for projects using Git
2022-04-14T09:21:18.0966404Z Version      : 0.9.13
2022-04-14T09:21:18.0966648Z Author       : GitTools Contributors
2022-04-14T09:21:18.0966978Z Help         : See the [documentation](https://gitversion.net/docs/) for help
2022-04-14T09:21:18.0967577Z ==============================================================================
2022-04-14T09:21:18.5580529Z Command: dotnet-gitversion D:/a/1/s /output json /output buildserver /config D:\a\1\s\build\GitVersion.yml
2022-04-14T09:21:18.5623256Z [command]C:\hostedtoolcache\windows\GitVersion.Tool\5.9.0\x64\dotnet-gitversion.exe D:/a/1/s /output json /output buildserver /config D:\a\1\s\build\GitVersion.yml
2022-04-14T09:21:28.1605223Z INFO [04/14/22 9:21:19:05] Working directory: D:/a/1/s
2022-04-14T09:21:28.1606662Z INFO [04/14/22 9:21:19:16] Branch from build environment: refs/pull/12445/merge
2022-04-14T09:21:28.1607933Z INFO [04/14/22 9:21:19:17] Project root is: D:\a\1\s\
2022-04-14T09:21:28.1609543Z INFO [04/14/22 9:21:19:17] DotGit directory is: D:\a\1\s\.git
2022-04-14T09:21:28.1610670Z INFO [04/14/22 9:21:19:17] Begin: Normalizing git directory for branch 'refs/pull/12445/merge'
2022-04-14T09:21:28.1611984Z   INFO [04/14/22 9:21:19:24] One remote found (origin -> '[...]').
2022-04-14T09:21:28.1614509Z   INFO [04/14/22 9:21:19:24] Skipping fetching, if GitVersion does not calculate your version as expected you might need to allow fetching or use dynamic repositories
2022-04-14T09:21:28.1615774Z   INFO [04/14/22 9:21:19:30] Creating local branch pull/12445/merge pointing at fab9373
[...]
2022-04-14T09:21:28.1990579Z   INFO [04/14/22 9:21:24:91] End: Normalizing git directory for branch 'refs/pull/12445/merge' (Took: 5,747.49ms)
2022-04-14T09:21:28.1991126Z   INFO [04/14/22 9:21:24:98] Begin: Loading version variables from disk cache
2022-04-14T09:21:28.1991687Z     INFO [04/14/22 9:21:24:98] Cache file D:\a\1\s\.git\gitversion_cache\9DC0FE0AB47F761F12F81760D7026923B4CCFFB9.yml not found.
2022-04-14T09:21:28.1992428Z   INFO [04/14/22 9:21:24:98] End: Loading version variables from disk cache (Took: 0.85ms)
2022-04-14T09:21:28.1992895Z   INFO [04/14/22 9:21:24:98] Using latest commit on specified branch
2022-04-14T09:21:28.1993398Z   INFO [04/14/22 9:21:25:19] Begin: Attempting to inherit branch configuration from parent branch
2022-04-14T09:21:28.1995754Z     INFO [04/14/22 9:21:25:25] HEAD is merge commit, this is likely a pull request using [...] as base
2022-04-14T09:21:28.1997439Z     INFO [04/14/22 9:21:25:39] Begin: Finding branch source of '[...]'
2022-04-14T09:21:28.1998094Z       INFO [04/14/22 9:21:25:45] Begin: Finding merge base between '[...]' and 'master'.
2022-04-14T09:21:28.1998716Z         INFO [04/14/22 9:21:25:47] Found merge base of d78db61 [...]
2022-04-14T09:21:28.1999447Z         INFO [04/14/22 9:21:25:48] Merge base of [...]' and 'master is d78db61 [...]
2022-04-14T09:21:28.2000414Z       INFO [04/14/22 9:21:25:48] End: Finding merge base between '[...]' and 'master'. (Took: 27.92ms)
2022-04-14T09:21:28.2001126Z       INFO [04/14/22 9:21:25:49] Begin: Finding merge base between '[...]' and 'origin/master'.
2022-04-14T09:21:28.2001815Z         INFO [04/14/22 9:21:25:49] Found merge base of d78db61 [...]
2022-04-14T09:21:28.2002702Z         INFO [04/14/22 9:21:25:49] Merge base of [...]' and 'origin/master is d78db61 [...]
2022-04-14T09:21:28.2003686Z       INFO [04/14/22 9:21:25:49] End: Finding merge base between '[...]' and 'origin/master'. (Took: 0.64ms)
2022-04-14T09:21:28.2004900Z       INFO [04/14/22 9:21:25:50] Multiple source branches have been found, picking the first one (master).
2022-04-14T09:21:28.2005398Z This may result in incorrect commit counting.
2022-04-14T09:21:28.2005727Z Options were:
2022-04-14T09:21:28.2005988Z master, origin/master
[...]
2022-04-14T09:21:28.2050707Z       INFO [04/14/22 9:21:26:75] Searching for commits reachable from 'master'.
2022-04-14T09:21:28.2051181Z       INFO [04/14/22 9:21:26:82] The branch 'master' has no matching commits.
2022-04-14T09:21:28.2051755Z       INFO [04/14/22 9:21:26:82] Searching for commits reachable from [...].
2022-04-14T09:21:28.2052408Z       INFO [04/14/22 9:21:26:88] The branch [...] has no matching commits.
2022-04-14T09:21:28.2053007Z     INFO [04/14/22 9:21:26:88] End: Getting branches containing the commit 'fab9373'. (Took: 704.73ms)
2022-04-14T09:21:28.2054115Z     INFO [04/14/22 9:21:26:88] Found possible parent branches: master, [...]
2022-04-14T09:21:28.2054980Z     WARN [04/14/22 9:21:26:92] Failed to inherit Increment branch configuration, ended up with: master, [...]
2022-04-14T09:21:28.2055579Z Falling back to Development branch config
2022-04-14T09:21:28.2056107Z   INFO [04/14/22 9:21:26:92] End: Attempting to inherit branch configuration from parent branch (Took: 1,729.32ms)
2022-04-14T09:21:28.2057336Z   INFO [04/14/22 9:21:27:01] Running against branch: pull/12445/merge (fab9373 Merge pull request 12445 from [....] into Development)
2022-04-14T09:21:28.2057955Z   INFO [04/14/22 9:21:27:02] Begin: Calculating base versions
2022-04-14T09:21:28.2058479Z     INFO [04/14/22 9:21:27:12] Fallback base version: 0.1.0 with commit count source 43158424297dcf0be336cfd91647d4e2af0afa85
2022-04-14T09:21:28.2059214Z     INFO [04/14/22 9:21:27:44] Git tag '0.1.142': 0.1.142 with commit count source 173a7c10e86a5bce424d21c56e20153df8c06941
2022-04-14T09:21:28.2059931Z     INFO [04/14/22 9:21:27:72] Found multiple base versions which will produce the same SemVer (0.2.0), taking oldest source for commit counting (Git tag '0.1.142')
2022-04-14T09:21:28.2060654Z     INFO [04/14/22 9:21:27:72] Base version used: Git tag '0.1.142': 0.1.142 with commit count source 173a7c10e86a5bce424d21c56e20153df8c06941
2022-04-14T09:21:28.2061259Z   INFO [04/14/22 9:21:27:72] End: Calculating base versions (Took: 708.63ms)
2022-04-14T09:21:28.2062055Z   INFO [04/14/22 9:21:27:72] 2 commits found between 173a7c1 Merge remote-tracking branch 'origin/Development' into [...] and fab9373 Merge pull request 12445 from [...] into Development
2022-04-14T09:21:28.2062901Z   INFO [04/14/22 9:21:27:73] Begin: Using mainline development mode to calculate current version
[...]
2022-04-14T09:21:28.2988718Z     INFO [04/14/22 9:21:27:82] '(^master$|^origin\/master$|^main$|^origin\/main$)' does not match '12445/merge'.
2022-04-14T09:21:28.2989215Z     INFO [04/14/22 9:21:27:82] '^support[/-]' does not match '12445/merge'.
2022-04-14T09:21:28.2989682Z     INFO [04/14/22 9:21:27:82] Found possible mainline branches: master, origin/master
2022-04-14T09:21:28.2990307Z     INFO [04/14/22 9:21:27:85] Multiple mainlines (master, origin/master) have the same merge base for the current branch, choosing master because we found that branch first...
2022-04-14T09:21:28.2991035Z     INFO [04/14/22 9:21:27:86] Current branch (pull/12445/merge) was branch from d78db61 Merged PR 12440: [...]
2022-04-14T09:21:28.2992538Z     INFO [04/14/22 9:21:27:86] 12 commits found between d78db61 Merged PR 12440: [...] and fab9373 [...] into Development
2022-04-14T09:21:28.2993535Z     INFO [04/14/22 9:21:27:86] Performing Patch increment for current branch 
2022-04-14T09:21:28.2996311Z   INFO [04/14/22 9:21:27:86] End: Using mainline development mode to calculate current version (Took: 131.57ms)
2022-04-14T09:21:28.2996897Z   INFO [04/14/22 9:21:27:86] Begin: Getting version tags from branch 'refs/heads/pull/12445/merge'.
2022-04-14T09:21:28.2997502Z   INFO [04/14/22 9:21:27:94] End: Getting version tags from branch 'refs/heads/pull/12445/merge'. (Took: 77.46ms)
2022-04-14T09:21:28.2999938Z   INFO [04/14/22 9:21:27:96] Begin: Creating dictionary
2022-04-14T09:21:28.3000440Z   INFO [04/14/22 9:21:27:97] End: Creating dictionary (Took: 6.65ms)
2022-04-14T09:21:28.3011575Z   INFO [04/14/22 9:21:27:97] Begin: Storing version variables to cache file D:\a\1\s\.git\gitversion_cache\9DC0FE0AB47F761F12F81760D7026923B4CCFFB9.yml
2022-04-14T09:21:28.3012743Z   INFO [04/14/22 9:21:28:03] End: Storing version variables to cache file D:\a\1\s\.git\gitversion_cache\9DC0FE0AB47F761F12F81760D7026923B4CCFFB9.yml (Took: 60.25ms)
2022-04-14T09:21:28.3013462Z Executing GenerateSetVersionMessage for 'AzurePipelines'.
2022-04-14T09:21:28.3760643Z Executing GenerateBuildLogOutput for 'AzurePipelines'.
2022-04-14T09:21:28.3854235Z {
2022-04-14T09:21:28.3854511Z   "Major": 0,
2022-04-14T09:21:28.3854770Z   "Minor": 1,
2022-04-14T09:21:28.3855019Z   "Patch": 143,
2022-04-14T09:21:28.3855308Z   "PreReleaseTag": "PullRequest12445.12",
2022-04-14T09:21:28.3855689Z   "PreReleaseTagWithDash": "-PullRequest12445.12",
2022-04-14T09:21:28.3856220Z   "PreReleaseLabel": "PullRequest12445",
2022-04-14T09:21:28.3856684Z   "PreReleaseLabelWithDash": "-PullRequest12445",
2022-04-14T09:21:28.3857091Z   "PreReleaseNumber": 12,
2022-04-14T09:21:28.3857380Z   "WeightedPreReleaseNumber": 30012,
2022-04-14T09:21:28.3857685Z   "BuildMetaData": null,
2022-04-14T09:21:28.3857953Z   "BuildMetaDataPadded": "",
2022-04-14T09:21:28.3858380Z   "FullBuildMetaData": "Branch.pull-12445-merge.Sha.fab937330526187ed313fa1153413181de738482",
2022-04-14T09:21:28.3858795Z   "MajorMinorPatch": "0.1.143",
2022-04-14T09:21:28.3859137Z   "SemVer": "0.1.143-PullRequest12445.12",
2022-04-14T09:21:28.3859673Z   "LegacySemVer": "0.1.143-PullRequest12445-12",
2022-04-14T09:21:28.3860044Z   "LegacySemVerPadded": "0.1.143-PullRequest1244-0012",
2022-04-14T09:21:28.3860394Z   "AssemblySemVer": "0.1.143.0",
2022-04-14T09:21:28.3860692Z   "AssemblySemFileVer": "0.1.143.0",
2022-04-14T09:21:28.3861037Z   "FullSemVer": "0.1.143-PullRequest12445.12",
2022-04-14T09:21:28.3861725Z   "InformationalVersion": "0.1.143-PullRequest12445.12+Branch.pull-12445-merge.Sha.fab937330526187ed313fa1153413181de738482",
2022-04-14T09:21:28.3862907Z   "BranchName": "pull/12445/merge",
2022-04-14T09:21:28.3863959Z   "EscapedBranchName": "pull-12445-merge",
2022-04-14T09:21:28.3864562Z   "Sha": "fab937330526187ed313fa1153413181de738482",
2022-04-14T09:21:28.3864922Z   "ShortSha": "fab9373",
2022-04-14T09:21:28.3865260Z   "NuGetVersionV2": "0.1.143-pullrequest1244-0012",
2022-04-14T09:21:28.3865669Z   "NuGetVersion": "0.1.143-pullrequest1244-0012",
2022-04-14T09:21:28.3866066Z   "NuGetPreReleaseTagV2": "pullrequest1244-0012",
2022-04-14T09:21:28.3866462Z   "NuGetPreReleaseTag": "pullrequest1244-0012",
2022-04-14T09:21:28.3867201Z   "VersionSourceSha": "d78db6128621b3fbe6fe834c8d62e07baceb0383",
2022-04-14T09:21:28.3867918Z   "CommitsSinceVersionSource": 12,
2022-04-14T09:21:28.3868392Z   "CommitsSinceVersionSourcePadded": "0012",
2022-04-14T09:21:28.3868707Z   "UncommittedChanges": 0,
2022-04-14T09:21:28.3868986Z   "CommitDate": "2022-04-14"
2022-04-14T09:21:28.3869654Z }
2022-04-14T09:21:28.3869945Z   INFO [04/14/22 9:21:28:12] Done writing 
2022-04-14T09:21:28.3967588Z ##[section]Async Command Start: Update Build Number
2022-04-14T09:21:28.6428702Z Update build number to 0.1.143-PullRequest12445.12 for build 32147
2022-04-14T09:21:28.6429120Z ##[section]Async Command End: Update Build Number
2022-04-14T09:21:28.6430479Z ##[section]Finishing: gitversionexecute

Actual Behavior

Logs have been stripped of sensitive information, and shortened.
Logs with 5.10.0

2022-04-14T09:17:02.0371958Z ##[section]Starting: gitversionexecute
2022-04-14T09:17:02.0601135Z ==============================================================================
2022-04-14T09:17:02.0601534Z Task         : Execute GitVersion Task
2022-04-14T09:17:02.0601877Z Description  : Easy Semantic Versioning (http://semver.org) for projects using Git
2022-04-14T09:17:02.0602195Z Version      : 0.9.13
2022-04-14T09:17:02.0602411Z Author       : GitTools Contributors
2022-04-14T09:17:02.0602757Z Help         : See the [documentation](https://gitversion.net/docs/) for help
2022-04-14T09:17:02.0603135Z ==============================================================================
2022-04-14T09:17:02.5204270Z Command: dotnet-gitversion D:/a/1/s /output json /output buildserver /config D:\a\1\s\build\GitVersion.yml
2022-04-14T09:17:02.5224531Z [command]C:\hostedtoolcache\windows\GitVersion.Tool\5.10.0\x64\dotnet-gitversion.exe D:/a/1/s /output json /output buildserver /config D:\a\1\s\build\GitVersion.yml
2022-04-14T09:17:09.5063297Z INFO [04/14/22 9:17:02:98] Working directory: D:/a/1/s
2022-04-14T09:17:09.5064397Z INFO [04/14/22 9:17:03:06] Project root is: D:\a\1\s\
2022-04-14T09:17:09.5065084Z INFO [04/14/22 9:17:03:06] DotGit directory is: D:\a\1\s\.git
2022-04-14T09:17:09.5065851Z INFO [04/14/22 9:17:03:06] Branch from build environment: 
2022-04-14T09:17:09.5066875Z INFO [04/14/22 9:17:03:06] Begin: Normalizing git directory for branch ''
2022-04-14T09:17:09.5068069Z   INFO [04/14/22 9:17:03:12] One remote found (origin -> '[...]').
2022-04-14T09:17:09.5069426Z   INFO [04/14/22 9:17:03:12] Skipping fetching, if GitVersion does not calculate your version as expected you might need to allow fetching or use dynamic repositories
[...]
2022-04-14T09:17:09.5448141Z   INFO [04/14/22 9:17:07:91] Creating local branch from remote tracking 'refs/remotes/origin/[...]'. <- last branch it fetches is unrelated to changes in the git repo.
2022-04-14T09:17:09.5450010Z   ERROR [04/14/22 9:17:09:25] An unexpected error occurred:
2022-04-14T09:17:09.5452608Z LibGit2Sharp.LibGit2SharpException: this remote has never connected
2022-04-14T09:17:09.5454103Z    at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 154
2022-04-14T09:17:09.5455585Z    at LibGit2Sharp.Core.Proxy.git_remote_ls(Repository repository, RemoteHandle remote) in /_/LibGit2Sharp/Core/Proxy.cs:line 2324
2022-04-14T09:17:09.5463791Z    at LibGit2Sharp.Network.ListReferencesInternal(String url, CredentialsHandler credentialsProvider) in /_/LibGit2Sharp/Network.cs:line 130
2022-04-14T09:17:09.5465477Z    at LibGit2Sharp.Network.ListReferences(Remote remote) in /_/LibGit2Sharp/Network.cs:line 55
2022-04-14T09:17:09.5466346Z    at GitVersion.GitRepository.GetPullRequestReference(AuthenticationInfo auth, Remote remote, String headTipSha) in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\Git\GitRepository.cs:line 151
2022-04-14T09:17:09.5467796Z    at GitVersion.GitRepository.<>c__DisplayClass28_0.<CreateBranchForPullRequestBranch>b__0() in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\Git\GitRepository.cs:line 79
2022-04-14T09:17:09.5468778Z    at GitVersion.RepositoryExtensions.RunSafe(Action operation) in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\RepositoryExtensions.cs:line 15
2022-04-14T09:17:09.5469741Z    at GitVersion.GitRepository.CreateBranchForPullRequestBranch(AuthenticationInfo auth) in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\Git\GitRepository.cs:line 69
2022-04-14T09:17:09.5470704Z    at GitVersion.GitPreparer.<>c__DisplayClass18_0.<EnsureHeadIsAttachedToBranch>b__3() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 237
2022-04-14T09:17:09.5471635Z    at GitVersion.Helpers.RetryAction`1.<>c__DisplayClass1_0.<Execute>b__0() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 16
2022-04-14T09:17:09.5472373Z    at Polly.Policy`1.<>c__DisplayClass11_0.<Execute>b__0(Context _, CancellationToken _)
2022-04-14T09:17:09.5473450Z    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)
2022-04-14T09:17:09.5474603Z    at Polly.Retry.RetryPolicy`1.Implementation(Func`3 action, Context context, CancellationToken cancellationToken)
2022-04-14T09:17:09.5475243Z    at Polly.Policy`1.Execute(Func`3 action, Context context, CancellationToken cancellationToken)
2022-04-14T09:17:09.5475717Z    at Polly.Policy`1.Execute(Func`1 action)
2022-04-14T09:17:09.5476577Z    at GitVersion.Helpers.RetryAction`2.Execute(Func`1 operation) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 35
2022-04-14T09:17:09.5477758Z    at GitVersion.Helpers.RetryAction`1.Execute(Action operation) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 14
2022-04-14T09:17:09.5478721Z    at GitVersion.GitPreparer.EnsureHeadIsAttachedToBranch(String currentBranchName, AuthenticationInfo authentication) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 237
2022-04-14T09:17:09.5480612Z    at GitVersion.GitPreparer.NormalizeGitDirectory(Boolean noFetch, String currentBranchName, Boolean isDynamicRepository) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 183
2022-04-14T09:17:09.5481684Z    at GitVersion.GitPreparer.NormalizeGitDirectory(String targetBranch, Boolean isDynamicRepository) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 134
2022-04-14T09:17:09.5483110Z    at GitVersion.GitPreparer.PrepareInternal(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 69
2022-04-14T09:17:09.5484090Z    at GitVersion.GitPreparer.Prepare() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 48
2022-04-14T09:17:09.5485762Z    at GitVersion.GitVersionCalculateTool.CalculateVersionVariables() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitVersionCalculateTool.cs:line 43
2022-04-14T09:17:09.5487056Z    at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.App\GitVersionExecutor.cs:line 66
2022-04-14T09:17:09.5487916Z   INFO [04/14/22 9:17:07:95] Creating local branch from remote tracking 'refs/remotes/origin/[...]'. <- fetching continues after errror?
[...]
2022-04-14T09:17:09.5505771Z   INFO [04/14/22 9:17:08:74] Local Refs:
2022-04-14T09:17:09.5506538Z refs/heads/azure-pipelines (beba0ba00c68a6302db05ead874942dced2fd352)
2022-04-14T09:17:09.5507123Z refs/heads/[...]
2022-04-14T09:17:09.5953268Z refs/remotes/pull/12445/merge (d3a87ff43aa0ef87f233769ddb1d2abf50666bce)
2022-04-14T09:17:09.5954519Z refs/tags/0.1.142 (52cece2d811cc87c76e80e1173c9513a759d90b9)
2022-04-14T09:17:09.5955926Z   INFO [04/14/22 9:17:08:78] No local branch pointing at the commit 'd3a87ff43aa0ef87f233769ddb1d2abf50666bce'. Fake branch needs to be created.
2022-04-14T09:17:09.5956886Z   INFO [04/14/22 9:17:08:78] Fetching remote refs to see if there is a pull request ref
2022-04-14T09:17:09.5957438Z   INFO [04/14/22 9:17:08:93] End: Normalizing git directory for branch '' (Took: 5,864.56ms)
2022-04-14T09:17:09.5958498Z   INFO [04/14/22 9:17:09:25] Attempting to show the current git graph (please include in issue): 
2022-04-14T09:17:09.5959909Z   INFO [04/14/22 9:17:09:25] Showing max of 100 commits
2022-04-14T09:17:09.5960806Z   INFO [04/14/22 9:17:09:45] *   d3a87ff4 7 minutes ago  (HEAD, pull/12445/merge)
2022-04-14T09:17:09.5961631Z |\  
2022-04-14T09:17:09.5962574Z | *   173a7c10 7 minutes ago  (tag: 0.1.142, origin/hotfix/[...], hotfix/[...])
2022-04-14T09:17:09.5963082Z | |\  
2022-04-14T09:17:09.5963287Z | |/  
2022-04-14T09:17:09.5963509Z |/|   
2022-04-14T09:17:09.5964253Z * |   74ce1021 17 hours ago  (origin/Development, Development)
2022-04-14T09:17:09.5965067Z |\ \  
2022-04-14T09:17:09.5965349Z | * | 01cfdd6c 25 hours ago 
2022-04-14T09:17:09.5965645Z | * | 1efb2508 26 hours ago 
2022-04-14T09:17:09.5965956Z * | |   3b46bac9 2 days ago 
2022-04-14T09:17:09.5966805Z |\ \ \  
2022-04-14T09:17:09.5967058Z | |/ /  
2022-04-14T09:17:09.5967266Z |/| |   
2022-04-14T09:17:09.5967987Z | * | e4d93ecc 2 days ago 
2022-04-14T09:17:09.5968735Z | * | 50adce61 2 days ago 
2022-04-14T09:17:09.5969053Z | * | c5dfbc40 3 days ago 
2022-04-14T09:17:09.5969341Z | * | beee064a 3 days ago 
2022-04-14T09:17:09.5971191Z |/ /  
2022-04-14T09:17:09.5971532Z | * ae12013e 21 hours ago 
2022-04-14T09:17:09.5973458Z | *   d78db612 2 days ago  (origin/master, master)
2022-04-14T09:17:09.5973789Z | |\  
2022-04-14T09:17:09.5974062Z | | * 08d59a55 2 days ago 
2022-04-14T09:17:09.5974305Z | |/  
2022-04-14T09:17:09.5974572Z | *   e19e606c 3 days ago 
2022-04-14T09:17:09.5974835Z | |\  
2022-04-14T09:17:09.5975037Z | |/  
2022-04-14T09:17:09.5975270Z |/|   
[...]
2022-04-14T09:17:09.6026318Z | | | | * a71fbaac 4 weeks ago 
2022-04-14T09:17:09.6026587Z 
2022-04-14T09:17:09.6026980Z INFO [04/14/22 9:17:02:87] Applicable build agent found: 'AzurePipelines'.
2022-04-14T09:17:09.6027449Z INFO [04/14/22 9:17:02:98] Working directory: D:/a/1/s
2022-04-14T09:17:09.6027884Z INFO [04/14/22 9:17:03:06] Project root is: D:\a\1\s\
2022-04-14T09:17:09.6028318Z INFO [04/14/22 9:17:03:06] DotGit directory is: D:\a\1\s\.git
2022-04-14T09:17:09.6028774Z INFO [04/14/22 9:17:03:06] Branch from build environment: 
2022-04-14T09:17:09.6029237Z INFO [04/14/22 9:17:03:06] Begin: Normalizing git directory for branch ''
2022-04-14T09:17:09.6029877Z   INFO [04/14/22 9:17:03:12] One remote found (origin -> '[...]').
2022-04-14T09:17:09.6030745Z   INFO [04/14/22 9:17:03:12] Skipping fetching, if GitVersion does not calculate your version as expected you might need to allow fetching or use dynamic repositories
2022-04-14T09:17:09.6031480Z   INFO [04/14/22 9:17:03:15] Creating local branch from remote tracking 'refs/remotes/origin/azure-pipelines'.
2022-04-14T09:17:09.6331767Z   INFO [04/14/22 9:17:08:63] Creating local branch from remote tracking 'refs/remotes/origin/[...]'.
2022-04-14T09:17:09.6332454Z   INFO [04/14/22 9:17:08:70] HEAD is detached and points at commit 'd3a87ff43aa0ef87f233769ddb1d2abf50666bce'.
2022-04-14T09:17:09.6332975Z   INFO [04/14/22 9:17:08:74] Local Refs:
2022-04-14T09:17:09.6333424Z refs/heads/azure-pipelines (beba0ba00c68a6302db05ead874942dced2fd352)
2022-04-14T09:17:09.6773010Z refs/remotes/pull/12445/merge (d3a87ff43aa0ef87f233769ddb1d2abf50666bce)
2022-04-14T09:17:09.6773500Z refs/tags/0.1.142 (52cece2d811cc87c76e80e1173c9513a759d90b9)
2022-04-14T09:17:09.6774139Z   INFO [04/14/22 9:17:08:78] No local branch pointing at the commit 'd3a87ff43aa0ef87f233769ddb1d2abf50666bce'. Fake branch needs to be created.
2022-04-14T09:17:09.6774817Z   INFO [04/14/22 9:17:08:78] Fetching remote refs to see if there is a pull request ref
2022-04-14T09:17:09.6775383Z   INFO [04/14/22 9:17:08:93] End: Normalizing git directory for branch '' (Took: 5,864.56ms)
2022-04-14T09:17:09.6776569Z   ERROR [04/14/22 9:17:09:25] An unexpected error occurred:
2022-04-14T09:17:09.6777330Z LibGit2Sharp.LibGit2SharpException: this remote has never connected
2022-04-14T09:17:09.6777906Z    at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 154
2022-04-14T09:17:09.6778602Z    at LibGit2Sharp.Core.Proxy.git_remote_ls(Repository repository, RemoteHandle remote) in /_/LibGit2Sharp/Core/Proxy.cs:line 2324
2022-04-14T09:17:09.6779878Z    at LibGit2Sharp.Network.ListReferencesInternal(String url, CredentialsHandler credentialsProvider) in /_/LibGit2Sharp/Network.cs:line 130
2022-04-14T09:17:09.6780576Z    at LibGit2Sharp.Network.ListReferences(Remote remote) in /_/LibGit2Sharp/Network.cs:line 55
2022-04-14T09:17:09.6781442Z    at GitVersion.GitRepository.GetPullRequestReference(AuthenticationInfo auth, Remote remote, String headTipSha) in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\Git\GitRepository.cs:line 151
2022-04-14T09:17:09.6782495Z    at GitVersion.GitRepository.<>c__DisplayClass28_0.<CreateBranchForPullRequestBranch>b__0() in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\Git\GitRepository.cs:line 79
2022-04-14T09:17:09.6783558Z    at GitVersion.RepositoryExtensions.RunSafe(Action operation) in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\RepositoryExtensions.cs:line 15
2022-04-14T09:17:09.6784525Z    at GitVersion.GitRepository.CreateBranchForPullRequestBranch(AuthenticationInfo auth) in D:\a\GitVersion\GitVersion\src\GitVersion.LibGit2Sharp\Git\GitRepository.cs:line 69
2022-04-14T09:17:09.6785516Z    at GitVersion.GitPreparer.<>c__DisplayClass18_0.<EnsureHeadIsAttachedToBranch>b__3() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 237
2022-04-14T09:17:09.6786701Z    at GitVersion.Helpers.RetryAction`1.<>c__DisplayClass1_0.<Execute>b__0() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 16
2022-04-14T09:17:09.6787450Z    at Polly.Policy`1.<>c__DisplayClass11_0.<Execute>b__0(Context _, CancellationToken _)
2022-04-14T09:17:09.6788536Z    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)
2022-04-14T09:17:09.6789654Z    at Polly.Retry.RetryPolicy`1.Implementation(Func`3 action, Context context, CancellationToken cancellationToken)
2022-04-14T09:17:09.6790294Z    at Polly.Policy`1.Execute(Func`3 action, Context context, CancellationToken cancellationToken)
2022-04-14T09:17:09.6790760Z    at Polly.Policy`1.Execute(Func`1 action)
2022-04-14T09:17:09.6791399Z    at GitVersion.Helpers.RetryAction`2.Execute(Func`1 operation) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 35
2022-04-14T09:17:09.6792262Z    at GitVersion.Helpers.RetryAction`1.Execute(Action operation) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 14
2022-04-14T09:17:09.6793232Z    at GitVersion.GitPreparer.EnsureHeadIsAttachedToBranch(String currentBranchName, AuthenticationInfo authentication) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 237
2022-04-14T09:17:09.6794495Z    at GitVersion.GitPreparer.NormalizeGitDirectory(Boolean noFetch, String currentBranchName, Boolean isDynamicRepository) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 183
2022-04-14T09:17:09.6795573Z    at GitVersion.GitPreparer.NormalizeGitDirectory(String targetBranch, Boolean isDynamicRepository) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 134
2022-04-14T09:17:09.6796898Z    at GitVersion.GitPreparer.PrepareInternal(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 69
2022-04-14T09:17:09.6797720Z    at GitVersion.GitPreparer.Prepare() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 48
2022-04-14T09:17:09.6798575Z    at GitVersion.GitVersionCalculateTool.CalculateVersionVariables() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitVersionCalculateTool.cs:line 43
2022-04-14T09:17:09.6799519Z    at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.App\GitVersionExecutor.cs:line 66
2022-04-14T09:17:09.6800402Z   INFO [04/14/22 9:17:09:25] Attempting to show the current git graph (please include in issue): 
2022-04-14T09:17:09.6800916Z   INFO [04/14/22 9:17:09:25] Showing max of 100 commits
2022-04-14T09:17:09.6801386Z   INFO [04/14/22 9:17:09:45] *   d3a87ff4 7 minutes ago  (HEAD, pull/12445/merge)
2022-04-14T09:17:09.6801763Z |\  
2022-04-14T09:17:09.6802244Z | *   173a7c10 7 minutes ago  (tag: 0.1.142, origin/hotfix/[...], hotfix/[...])
2022-04-14T09:17:09.6802731Z | |\  
2022-04-14T09:17:09.6802985Z | |/  
2022-04-14T09:17:09.6803211Z |/|   
2022-04-14T09:17:09.6803532Z * |   74ce1021 17 hours ago  (origin/Development, Development)
2022-04-14T09:17:09.6803870Z |\ \  
2022-04-14T09:17:09.6804137Z | * | 01cfdd6c 25 hours ago 
2022-04-14T09:17:09.6804430Z | * | 1efb2508 26 hours ago 
2022-04-14T09:17:09.6804743Z * | |   3b46bac9 2 days ago 
2022-04-14T09:17:09.6804988Z |\ \ \  
2022-04-14T09:17:09.6805221Z | |/ /  
2022-04-14T09:17:09.6805426Z |/| |   
2022-04-14T09:17:09.6805689Z | * | e4d93ecc 2 days ago 
2022-04-14T09:17:09.6806208Z | * | 50adce61 2 days ago 
2022-04-14T09:17:09.6806518Z | * | c5dfbc40 3 days ago 
2022-04-14T09:17:09.6806798Z | * | beee064a 3 days ago 
2022-04-14T09:17:09.6807061Z |/ /  
2022-04-14T09:17:09.6807308Z | * ae12013e 21 hours ago 
2022-04-14T09:17:09.6807665Z | *   d78db612 2 days ago  (origin/master, master)
2022-04-14T09:17:09.6807955Z | |\  
2022-04-14T09:17:09.6808216Z | | * 08d59a55 2 days ago 
2022-04-14T09:17:09.6808478Z | |/  
2022-04-14T09:17:09.6808724Z | *   e19e606c 3 days ago 
2022-04-14T09:17:09.6808984Z | |\  
2022-04-14T09:17:09.6809184Z | |/  
2022-04-14T09:17:09.6809401Z |/|   
2022-04-14T09:17:09.6875220Z | | | | * a71fbaac 4 weeks ago 
2022-04-14T09:17:09.6875430Z 
2022-04-14T09:17:09.6876310Z   INFO [04/14/22 9:17:09:48] Done writing 
2022-04-14T09:17:09.6915591Z ##[error]SyntaxError: Unexpected end of JSON input
2022-04-14T09:17:09.6938958Z ##[section]Finishing: gitversionexecute

Steps to Reproduce

Install 5.10.0 instead of 5.9.0.
Run gitversion/execute@0 task

Context

Builds fail on the gitversion/execute@0 task when the gitversion/setup@0 task installs 5.10.0.

Your Environment

Issue occurs on azure pipelines running the windows-2022 (windows-latest) image. The repository is hosted on the Azure DevOps Repos

  • Version Used: 5.10.0
  • Operating System and version (Windows 10, Ubuntu 18.04): Windows-latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions