git-ecosystem / git-credential-manager

Secure, cross-platform Git credential storage with authentication to GitHub, Azure Repos, and other popular Git hosting services.
Other
6.91k stars 1.82k forks source link

Unable to Decrypt GPG File in VSCode on Ubuntu 24.04 Without First Using Terminal #1665

Open jcr010910 opened 4 months ago

jcr010910 commented 4 months ago

Version

2.5.1+90d5f897f164a8fe07d2aa3bf7db439b0b4e03ea

Operating system

Linux

OS version or distribution

Ubuntu 24

Git hosting provider(s)

Azure DevOps

Other hosting provider

No response

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

https://dev.azure.com/{org}

Can you access the remote repository directly in the browser?

Yes, I can access the repository

Expected behavior

1.  Using pass ls and pass show commands in the terminal works perfectly.
2.  Running git pull in the terminal prompts me to enter the passphrase via a pop-up, and it works correctly.
3.  When I use VSCode after trying these commands in the terminal, it works (likely due to caching and gpg-agent).
4. I have added export GPG_TTY=$(tty) to my ~/.bashrc.

Question: What am I missing to make GPG decryption run directly in VSCode without having to use the terminal first?

Actual behavior

If I try to use VSCode directly without first using the terminal, it fails to decrypt the GPG file stored in the password store.

Logs

No response