Skip to content

[Bug] Unable to run on Centos 7 missing git2-106a5f2Β #2204

@N0K0

Description

@N0K0

Describe the bug
When running gitversion on my centos 7 server i get the following trace:

[root@osl-bamboo1 ~]# /home/nikolas/gitversion_test_1 git/ INFO [03/25/20 19:25:24:25] Working directory: git/INFO [03/25/20 19:25:24:26] IsDynamicGitRepository: FalseERROR [03/25/20 19:25:24:27] An unexpected error occurred: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'git2-106a5f2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgit2-106a5f2: cannot open shared object file: No such file or directory at LibGit2Sharp.Core.NativeMethods.git_libgit2_init() at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary() at LibGit2Sharp.Core.NativeMethods..cctor() --- End of inner exception stack trace --- at LibGit2Sharp.Core.NativeMethods.git_buf_dispose(GitBuf buf) at LibGit2Sharp.Core.Proxy.git_buf_dispose(GitBuf buf) at LibGit2Sharp.Core.Handles.GitBuf.Dispose() at LibGit2Sharp.Core.Proxy.ConvertPath(Func2 pathRetriever)
at LibGit2Sharp.Core.Proxy.git_repository_discover(FilePath start_path)
at LibGit2Sharp.Repository.Discover(String startingPath)
at GitVersion.GitPreparer.GetProjectRootDirectoryInternal()
at GitVersion.GitPreparer.GetProjectRootDirectory()
at GitVersion.Configuration.ConfigFileLocator.Verify(IGitPreparer gitPreparer)
at GitVersion.GitVersionExecutor.VerifyConfiguration()
at GitVersion.GitVersionExecutor.VerifyArgumentsAndRun(Arguments arguments)INFO [03/25/20 19:25:24:27] INFO [03/25/20 19:25:24:27] Attempting to show the current git graph (please include in issue): INFO [03/25/20 19:25:24:27] Showing max of 100 commits
`

Steps to Reproduce

Create an repo with only one commit and run the rool

Context

Unable to use this tool to generate SemVer on my build server.

Your Environment

CentOS Linux release 7.7.1908
3.10.0-1062.4.3.el7.x86_64 #1 SMP Wed Nov 13 23:58:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

git version 2.9.3
git version 2.18.2

Issue reproduced in the following versions:
linux-5.1.1
linux-5.1.3
linux-5.2.4

Works like a charm on macOS πŸ‘

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