Skip to content
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

Unusable due to exceptions in both Linux and Windows #2054

Open
tomer-ds opened this issue Aug 7, 2023 · 1 comment
Open

Unusable due to exceptions in both Linux and Windows #2054

tomer-ds opened this issue Aug 7, 2023 · 1 comment

Comments

@tomer-ds
Copy link

tomer-ds commented Aug 7, 2023

Hi,
I have been attempting to use your very nice looking tool.
Unfortunately I continiualy get different exceptions basedon OS

Windows:

PS C:\Git\OM2\om2-github-actions> Find-GitRepository
format-default: Exception has been thrown by the target of an invocation.

Ubuntu running PWSH

PS /mnt/c/Git/OM2/om2-github-actions> Import-Module LibGit2
MethodInvocationException: Exception calling "Register" with "1" argument(s): "The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception."

An error has occurred that was not properly handled. Additional information is shown below. The PowerShell process will exit.
Unhandled exception. System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
 ---> System.DllNotFoundException: Unable to load shared library 'git2-15e1193' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
/opt/microsoft/powershell/7/git2-15e1193.so: cannot open shared object file: No such file or directory
/home/tomer/.local/share/powershell/Modules/LibGit2/0.9.1/bin/git2-15e1193.so: cannot open shared object file: No such file or directory
/opt/microsoft/powershell/7/libgit2-15e1193.so: cannot open shared object file: No such file or directory
/home/tomer/.local/share/powershell/Modules/LibGit2/0.9.1/bin/libgit2-15e1193.so: cannot open shared object file: No such file or directory
/opt/microsoft/powershell/7/git2-15e1193: cannot open shared object file: No such file or directory
/home/tomer/.local/share/powershell/Modules/LibGit2/0.9.1/bin/git2-15e1193: cannot open shared object file: No such file or directory
/opt/microsoft/powershell/7/libgit2-15e1193: cannot open shared object file: No such file or directory
/home/tomer/.local/share/powershell/Modules/LibGit2/0.9.1/bin/libgit2-15e1193: cannot open shared object file: No such file or directory

   at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
   at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject..ctor()
   at LibGit2Sharp.Core.NativeMethods..cctor()
   --- End of inner exception stack trace ---
   at LibGit2Sharp.Core.NativeMethods.RemoveHandle()
   at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject.Finalize()
[1]    9021 IOT instruction  pwsh

I get the feeling I am missing something

@ethomson ethomson transferred this issue from libgit2/libgit2.github.io Aug 7, 2023
@ethomson
Copy link
Member

ethomson commented Aug 7, 2023

Hi @tomer-ds - I moved this issue over to the LibGit2Sharp repository since that's a slightly better fit. But I think that you're actually using the GitAutomation PowerShell module (formerly known as LibGit2.PowerShell). Your question might be better over there!

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

No branches or pull requests

2 participants