Why does git complain that no GPG agent is running?

It is likely that your gpg-agent and gpg binaries are from different packages.

This can happen when you're using Git Bash (which ships with gpg) and you're installing GnuPG4Win additionally. The latter ships with a more recent version.

You can verfiy if this is your problem, by checking the version of both programs:

% gpg-agent --version
gpg-agent (GnuPG) 2.1.7

% gpg --version                                                               
gpg (GnuPG) 1.4.19

If this is your problem, you should tell git which gpg binary to use:

% git config --global gpg.program gpg2

When this message is issued upon commiting:

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

The following command starts the gpg-agent on Windows:

gpg-connect-agent reloadagent /bye

After reloading the agent the signing password prompt is displayed properly.

Environment
Windows 11 Home 21H2
git version 2.32.0.windows.2
gpg (GnuPG) 2.3.1
gpg-agent (GnuPG) 2.3.1