I also tried setting the path of the gpg program in .gitconfig to
[gpg]
program = "C:\\Program Files (x86)\\GnuPG\\bin\\gpg.exe"
However, if I try to open the repo in Command Prompt, it actually works (it allows me to commit and enter the passphrase). I have correctly installed gpg4win and I'm on Windows 10. Can anyone help me here?