git-ecosystem / git-ecosystem/git-credential-manager
Allow MSAL token cache to use GCM's collection of secure storage options
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9.3k
- Forks
- 2.9k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 14
Description
Platform: ARM64
OS: Ubuntu 24.04 Noble
Git Version: 2.54.0
Simple output:
warning: cannot persist Microsoft authentication token cache securely!
warning: using plain-text fallback token cache
To sign in, use a web browser to open the page https://login.microsoft.com/device and enter the code I6H4VXSFQ to authenticate.
Debug output (GCM_TRACE=1):
<...omitted>
15:58:18.019798 ...sHostProvider.cs:259 trace: [GeneratePersonalAccessTokenAsync] Getting Azure AD access token...
15:58:18.022886 ...uthentication.cs:146 trace: [GetTokenForUserAsync] OS broker is not available or enabled.
15:58:18.022923 ...uthentication.cs:152 trace: [GetTokenForUserAsync] MSA passthrough is enabled.
15:58:18.041199 ...uthentication.cs:677 trace: [RegisterTokenCacheAsync] Configuring MSAL token cache...
warning: cannot persist Microsoft authentication token cache securely!
15:58:18.082464 ...uthentication.cs:701 trace: [RegisterTokenCacheAsync] Cannot persist Microsoft Authentication data securely!
15:58:18.082720 ...uthentication.cs:702 trace: [RegisterTokenCacheAsync] ! error: 'Persistence check failed. Reason: An exception was encountered while processing libsecret error information during saving in the Storage. Error code: 0. OS error code 0.'.
15:58:18.082754 ...uthentication.cs:702 trace: [RegisterTokenCacheAsync] > 'An exception was encountered while processing libsecret error information during saving in the Storage. Error code: 0'.
15:58:18.082770 ...uthentication.cs:702 trace: [RegisterTokenCacheAsync] > 'An error was encountered while saving secret to keyring in the Storage domain:'94' code:'2' message:'The name org.freedesktop.secrets was not provided by any .service files' .Error code: 2'.
warning: using plain-text fallback token cache
15:58:18.083161 ...uthentication.cs:718 trace: [RegisterTokenCacheAsync] Using fall-back plaintext token cache on Linux.
15:58:18.084285 ...uthentication.cs:732 trace: [RegisterTokenCacheAsync] Token cache configured.
15:58:18.089845 ...uthentication.cs:258 trace: [GetTokenForUserAsync] Performing interactive auth with device code...
15:58:18.123327 ...pClientFactory.cs:60 trace: [CreateClient] Creating new HTTP client instance...
15:58:18.123501 ...pClientFactory.cs:80 trace: [CreateClient] Git's SSL/TLS backend is: OpenSsl
To sign in, use a web browser to open the page https://login.microsoft.com/device and enter the code ILV652G9S to authenticate.
It seems that GCM is trying to use org.freedesktop.secrets API rather than GPG. But I have GCM_CREDENTIAL_STORE=gpg and global Git config credential.credentialStore=gpg
I have pass inited and pinenty-tty set.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Authentication.cs at RegisterTokenCacheAsync, around the trace lines 677–732, and trace how credential.credentialStore and GCM_CREDENTIAL_STORE are handled. Compare that path with GCM’s other secure-storage options. Done means the configured GPG/pass storage can be used for the MSAL token cache without falling back to plaintext, with the relevant authentication behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- authentication, security, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100