libgit2 / libgit2/libgit2sharp
Unusable due to exceptions in both Linux and Windows
未關閉
還沒有人認領這個 Issue。
- 主要語言
- C#
- 星號
- 3.5k
- 分支
- 925
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
在 Windows 上執行 Find-GitRepository,並在 Ubuntu 上使用 PowerShell 匯入 LibGit2,以重現回報的失敗。檢查 LibGit2Sharp 如何載入原生 git2-15e1193 程式庫,並驗證模組能夠載入,且儲存庫探索功能可以在不出現平台特定例外的情況下正常運作。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, git, powershell
- 領域
- operating-systems, tooling
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100