GCM is unable to find libSkiaSharp on Ubuntu in WSL
Version 2.0.935+8b4735fc7b
Operating system
Windows 11 Pro x64, WSL, Ubuntu 22.04.2 LTS.
Installed a fresh Ubuntu in WSL, downloaded https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.0.935/gcm-linux_amd64.2.0.935.deb, installed it with deb -i, installed gpg and pass, ran
gpg --gen-key
pass init <gpg_id>
export GCM_CREDENTIAL_STORE=gpg
git-credential-manager configure
What Git host provider are you trying to connect to? A private GitBucket host.
Expected behavior
When I git clone a new repo, a GUI window with login/password form appears.
Actual behavior
An exception "System.DllNotFoundException" is thrown, and a standard console prompt Username for '<repo_url>': apears.
Logs
Unhandled exception. System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory
at SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
at SkiaSharp.SKImageInfo..cctor()
--- End of inner exception stack trace ---
at Avalonia.Skia.PlatformRenderInterface..ctor(ISkiaGpu skiaGpu, Nullable`1 maxResourceBytes) in /_/src/Skia/Avalonia.Skia/PlatformRenderInterface.cs:line 27
at Avalonia.Skia.SkiaPlatform.Initialize(SkiaOptions options) in /_/src/Skia/Avalonia.Skia/SkiaPlatform.cs:line 20
at Avalonia.SkiaApplicationExtensions.<>c__0`1.<UseSkia>b__0_0() in /_/src/Skia/Avalonia.Skia/SkiaApplicationExtensions.cs:line 20
at Avalonia.Controls.AppBuilderBase`1.Setup() in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 304
at Avalonia.Controls.AppBuilderBase`1.SetupWithoutStarting() in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 167
at GitCredentialManager.UI.AvaloniaUi.<>c__DisplayClass6_1.<ShowWindowAsync>b__1()
at GitCredentialManager.UI.Dispatcher.DispatcherJob.Execute()
at GitCredentialManager.UI.Dispatcher.DispatcherJobQueue.Run()
at GitCredentialManager.UI.Dispatcher.Run()
at GitCredentialManager.UI.Program.Main(String[] args)
fatal: helper error (134): Unknown
running with LD_DEBUG=libs git clone <repo_url> displays
1488: find library=libSkiaSharp.so [0]; searching
1488: search cache=/etc/ld.so.cache
1488: search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib (system search path)
1488: trying file=/lib/x86_64-linux-gnu/libSkiaSharp.so
1488: trying file=/usr/lib/x86_64-linux-gnu/libSkiaSharp.so
1488: trying file=/lib/libSkiaSharp.so
1488: trying file=/usr/lib/libSkiaSharp.so
1488:
1488: find library=liblibSkiaSharp.so [0]; searching
1488: search cache=/etc/ld.so.cache
1488: search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib (system search path)
1488: trying file=/lib/x86_64-linux-gnu/liblibSkiaSharp.so
1488: trying file=/usr/lib/x86_64-linux-gnu/liblibSkiaSharp.so
1488: trying file=/lib/liblibSkiaSharp.so
1488: trying file=/usr/lib/liblibSkiaSharp.so
1488:
1488: find library=libSkiaSharp [0]; searching
1488: search cache=/etc/ld.so.cache
1488: search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib (system search path)
1488: trying file=/lib/x86_64-linux-gnu/libSkiaSharp
1488: trying file=/usr/lib/x86_64-linux-gnu/libSkiaSharp
1488: trying file=/lib/libSkiaSharp
1488: trying file=/usr/lib/libSkiaSharp
1488:
1488: find library=liblibSkiaSharp [0]; searching
1488: search cache=/etc/ld.so.cache
1488: search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib (system search path)
1488: trying file=/lib/x86_64-linux-gnu/liblibSkiaSharp
1488: trying file=/usr/lib/x86_64-linux-gnu/liblibSkiaSharp
1488: trying file=/lib/liblibSkiaSharp
1488: trying file=/usr/lib/liblibSkiaSharp
Actually, the library is there:
$ ls -l /usr/local/share/gcm-core/
total 446476
-rwxr-xr-x 1 1001 123 94742189 Feb 28 22:10 Atlassian.Bitbucket.UI
-rwxr-xr-x 1 1001 123 94777769 Feb 28 22:10 GitHub.UI
-rwxr-xr-x 1 1001 123 94709673 Feb 28 22:10 GitLab.UI
-rwxr-xr-x 1 1001 123 2597 Feb 28 22:10 NOTICE
-rwxr-xr-x 1 1001 123 67423508 Feb 28 22:10 git-credential-manager
-rwxr-xr-x 1 1001 123 94669764 Feb 28 22:10 git-credential-manager-ui
-rwxr-xr-x 1 1001 123 1607016 Feb 28 22:10 libHarfBuzzSharp.so
-rwxr-xr-x 1 1001 123 9240832 Feb 28 22:10 libSkiaSharp.so
Can you run git-credential-manager diagnose and attach the output?
Reports nothing wrong
$ git-credential-manager diagnose
Running diagnostics...
[ OK ] Environment
[ OK ] File system
[ OK ] Networking
[ OK ] Git
[ OK ] Credential storage
[ OK ] Microsoft authentication (AAD/MSA)
[ OK ] GitHub API
Diagnostic summary: 7 passed, 0 skipped, 0 failed.
Log files:
/tmp/gcm-diagnose.log
Caution: Log files may include sensitive information - redact before sharing.
Can you attach the full output log file?
I had this same issue. For me the solution was just to run git config --global credential.guiPrompt false since my wsl ubuntu has no GUI
My solution using arch linux: install the lib git-credential-manager-core-extras
This lib add many UI's support for your git-credential-manager
I had this same issue. For me the solution was just to run
git config --global credential.guiPrompt falsesince my wsl ubuntu has no GUI
Thank you this worked for me 👍
Possibly related: just hit this on completely fresh install
In my case error message is a bit different and the actual culprit is missing libfontconfig
"apt install build-essential" pulls it in and fixes the problem (you could install it directly, but i needed it for node anyway)
Maybe deb package should have some dependencies set? Or documented (which is probably more cross-distro compatible solution)