Git signed commits - How to suppress "You need a passphrase to unlock the secret key..." : <p>I changed my global Git configuration to sign all commits. I also use gpg-agent so that I don't have to type my password every time.</p>

<p>Now every time I make a new commit I see the following five lines printed to my console:</p>

<pre><code>[blank line]
You need a passphrase to unlock the secret key for
user: "John Doe &lt;mail@gmail.com&gt;"
2048-bit RSA key, ID ABCDEF12, created 2016-01-01
[blank line]
</code></pre>

<p>Even worse, when I do a simple stash, this message is printed <em>twice</em>, needlessly filling my console (I assume for one for each of the two commit objects that are created).</p>

<p>Is there a way to suppress this output?</p>
