git-credential-manager icon indicating copy to clipboard operation
git-credential-manager copied to clipboard

Crushed when `GCM_CREDENTIAL_STORE="gpg"`

Open KisaragiEffective opened this issue 3 years ago • 4 comments

Which version of GCM are you using?

2.0.779+57cd9d4e50

Which Git host provider are you trying to connect to?

  • [ ] Azure DevOps
  • [ ] Azure DevOps Server (TFS/on-prem)
  • [x] GitHub
  • [ ] GitHub Enterprise
  • [ ] Bitbucket
  • [ ] Other - please describe

Can you access the remote repository directly in the browser using the remote URL?

From a terminal, run git remote -v to see your remote URL.

  • [x] Yes
  • [ ] No, I get a permission error
  • [ ] No, for a different reason - please describe

Expected behavior Not being crushed, and asking password by GPG frontend (did export GCM_CREDENTIAL_STORE="gpg")

Actual behavior

Crushed everytime, with following debug dumps.

Logs

$ git push --set-upstream origin 0
04:37:21.881740 ...re/Application.cs:95 trace: [RunInternalAsync] Version: 2.0.779.52567
04:37:21.883253 ...re/Application.cs:96 trace: [RunInternalAsync] Runtime: .NET 6.0.3
04:37:21.883282 ...re/Application.cs:97 trace: [RunInternalAsync] Platform: Linux (x86-64)
04:37:21.883292 ...re/Application.cs:98 trace: [RunInternalAsync] OSVersion: Linux kisaragi-MX500 5.13.0-52-generic #59~20.04.1-Ubuntu SMP Thu Jun 16 21:21:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
04:37:21.883354 ...re/Application.cs:99 trace: [RunInternalAsync] AppPath: /usr/local/share/gcm-core/git-credential-manager-core
04:37:21.883396 ...e/Application.cs:100 trace: [RunInternalAsync] Arguments: get
04:37:21.987889 ...GitCommandBase.cs:33 trace: [ExecuteAsync] Start 'get' command...
04:37:21.999611 ...GitCommandBase.cs:47 trace: [ExecuteAsync] Detecting host provider for input:
04:37:22.000922 ...GitCommandBase.cs:48 trace: [ExecuteAsync]   protocol=https
04:37:22.000942 ...GitCommandBase.cs:48 trace: [ExecuteAsync]   host=github.com
04:37:22.037632 ...viderRegistry.cs:149 trace: [GetProviderAsync] Performing auto-detection of host provider.
04:37:22.042353 ...viderRegistry.cs:162 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms.
04:37:22.046510 ...viderRegistry.cs:170 trace: [GetProviderAsync] Checking against 4 host providers registered with priority 'Normal'.
04:37:22.048719 ...GitCommandBase.cs:50 trace: [ExecuteAsync] Host provider 'GitHub' was selected.
04:37:22.069828 .../HostProvider.cs:126 trace: [GetCredentialAsync] Looking for existing credential in store with service=https://github.com account=...
04:37:22.077206 ...edentialStore.cs:352 trace: [GetGpgPath] Using PATH-located GPG (gpg) executable: /usr/bin/gpg
04:37:22.081981 .../HostProvider.cs:131 trace: [GetCredentialAsync] No existing credentials found.
04:37:22.082023 .../HostProvider.cs:134 trace: [GetCredentialAsync] Creating new credential...
04:37:22.088281 ...bHostProvider.cs:255 trace: [GetSupportedAuthenticationModesAsync] https://github.com/ is github.com - authentication schemes: 'Pat, OAuth'
04:37:22.111493 ...enticationBase.cs:40 trace: [InvokeHelperAsync] Starting helper process: /usr/local/share/gcm-core/GitHub.UI prompt --browser --device --pat
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
fatal: helper error (134): Default font family name can't be null or empty.
   at GitCredentialManager.Authentication.AuthenticationBase.InvokeHelperAsync(String path, String args, IDictionary`2 standardInput, CancellationToken ct)
   at GitHub.GitHubAuthentication.GetAuthenticationAsync(Uri targetUri, String userName, AuthenticationModes modes)
   at GitHub.GitHubHostProvider.GenerateCredentialAsync(InputArguments input)
   at GitCredentialManager.HostProvider.GetCredentialAsync(InputArguments input)
   at GitCredentialManager.Commands.GetCommand.ExecuteInternalAsync(InputArguments input, IHostProvider provider)
   at GitCredentialManager.Commands.GitCommandBase.ExecuteAsync()
   at System.CommandLine.Invocation.CommandHandler.GetExitCodeAsync(Object value, InvocationContext context)
   at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass27_0.<<UseVersionOption>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass25_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__24_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass11_0.<<UseDebugDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
Username for 'https://github.com': 

KisaragiEffective avatar Jul 04 '22 19:07 KisaragiEffective

Would you mind setting GCM_TRACE=1 and then running /usr/local/share/gcm-core/GitHub.UI prompt --browser --device --pat and pasting in the output?

ldennington avatar Jul 20 '22 14:07 ldennington

@ldenningto sure, please take a while.

KisaragiEffective avatar Jul 21 '22 22:07 KisaragiEffective

@ldennington Sir, output is here:

error=Default font family name can't be null or empty.

AkiraVoid avatar Aug 31 '22 07:08 AkiraVoid

Default font family name can't be null or empty

That sounds like an AvaloniaUI problem that might be fixed thusly:

sudo apt-get install ttf-mscorefonts-installer

dscho avatar Aug 31 '22 11:08 dscho

This will be resolved if you install the font that is required for the GUI (see #899 for details).

ldennington avatar Feb 27 '23 22:02 ldennington