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

gpg: Decryption failed: We don't have the secret key

Open manuelgarciacr opened this issue 2 years ago • 4 comments

Version

2.3.2

Operating system

Linux

OS version or distribution

Ubuntu 22.04.3 LTS

Git hosting provider(s)

GitHub

Other hosting provider

No response

(Azure DevOps only) What format is your remote URL?

None

Can you access the remote repository directly in the browser?

Yes, I can access the repository

Expected behavior

I don't know why I am getting this error if git connects to the repository and everything is successful

Actual behavior

I am getting this error but git connects to the repository and everything is successful

Logs

No response

manuelgarciacr avatar Nov 06 '23 22:11 manuelgarciacr

Diagnostic: Credential storage Skipped: False Success: False Exception: GitCredentialManager.Trace2Exception: Failed to decrypt file '/home/manuel/.password-store/git/https/example.com/9b685048d3224d9d899099e6a808fae7/john.doe.gpg' with gpg. exit=2, out=, err=gpg: cifrado con clave de 3072 bits RSA, ID 3FC7196B16A6FC03, creada el 2023-07-02 "Manuel García Criado [email protected]" gpg: descifrado fallido: No tenemos la clave secreta

at GitCredentialManager.Gpg.DecryptFile(String path) at GitCredentialManager.Interop.Posix.GpgPassCredentialStore.TryDeserializeCredential(String path, FileCredential& credential) at GitCredentialManager.PlaintextCredentialStore.Enumerate(String service, String account)+MoveNext() at GitCredentialManager.PlaintextCredentialStore.Remove(String service, String account) at GitCredentialManager.CredentialStore.Remove(String service, String account) at GitCredentialManager.Diagnostics.CredentialStoreDiagnostic.RunInternalAsync(StringBuilder log, IList`1 additionalFiles) at GitCredentialManager.Diagnostics.Diagnostic.RunAsync() Log: ICredentialStore instance is of type: CredentialStore Writing test credential... OK Reading test credential...Deleting test credential...

manuelgarciacr avatar Nov 06 '23 22:11 manuelgarciacr

I installed Ubuntu on a failed Linux Mint distribution and recovered the home folder from the backup

manuelgarciacr avatar Nov 06 '23 22:11 manuelgarciacr