Windows WSL2下VSCode Dev Container中GPG重载Agent报错求助
WSL2开发容器配置GPG签名Git提交遇gpg-agent重载错误
问题场景
在Windows WSL2环境的默认Python开发容器中配置GPG以实现Git签名提交,执行gpg-agent重载命令时失败。
已执行操作
- Windows系统安装gpg4win
- 连接开发容器后,向
~/.gnupg/gpg-agent.conf文件添加配置:pinentry-program /mnt/c/Program\ Files\ \(x86\)/Gpg4win/bin/pinentry.exe
错误信息
执行命令 gpg-connect-agent reloadagent /bye 时,出现如下错误:
gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent' gpg-connect-agent: failed to create temporary file '/root/.gnupg/.#lk0x000055a2a31ddd90.aae1d09ea764.617': No such file or directory gpg-connect-agent: can't connect to the agent: No such file or directory gpg-connect-agent: error sending standard options: No agent running
已尝试但无效的方案
- 尝试过WSL2 Ubuntu 20.04版本下VSCode开发容器集成GPG签名Git提交的配置方案
- 尝试过WSL2中使用VSCode实现签名Git提交的教程方案
内容的提问来源于stack exchange,提问作者cyberia
相关产品推荐
相关产品推荐

