Git has an option that specifies which ssh to use, it uses Plink and not the Bash ssh. When you use scp it uses the the Bash ssh. You can also download the commit-msg
hook directly from the gerrit server via https://yourserver/r/tools/hooks/commit-msg
If you are always working with Gerrit than I would recommend that you would copy the commit-msg hook to C:\Program Files (x86)\Git\share\git-core\templates\hooks
. This way the commit-msg
hook will always be placed in you .git\hooks
folder when you clone a repository. As I work 90% of my time on Gerrit repositories I find it easier to delete it when I don't need it then to add it when I need it.
Or else, you can generate a new ssh key and add this as well. Then you have one key for command line purposes uses ssh and scp and one for Git using PLink.
Actually, for my company I now ensure that new installs always specify to use SSH and not PLink as it prevents problems like this.