Search code examples
gitgithubvisual-studio-codecertificategnupg

can't connect to the gpg-agent: IPC connect call failed in windows 10 vscode


I want to singing my commit in git but vscode cli return this error !

git commit -S -m 'Message Commit'

gpg: can't connect to the gpg-agent: IPC connect call failed

gpg:keydb_search failed: No agent running

gpg: skipped "MYName myEmail@gmail.com": No agent running

gpg: signing failed: No agent running error:

gpg: failed to sign the data fatal: failed to write commit object

error: gpg failed to sign the data

fatal: failed to write commit object

How can i fix it?


Solution

  • I found it. In windows 10 and 11 we need add gpg program address to git config to Keys work correctly

    git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
    

    This work for me