gpg failed to sign the data fatal: failed to write commit object [Git 2.10.0]
<p>I followed few articles over the <a href="https://coderwall.com/p/euwpig/a-better-git-log" rel="noreferrer">pretty</a> attributes on <a href="https://github.com/blog/2242-git-2-10-has-been-released" rel="noreferrer">Git 2.10</a> release note. Going through which upgraded the git to 2.10.0 and made changes to global <code>.gitconfig</code> resulting as follows - </p>

<pre><code>[filter "lfs"]
    clean = git-lfs clean %f
    smudge = git-lfs smudge %f
    required = true
[user]
    name = xyz
    email = abc.def@gmail.com
    signingkey = AAAAAAA
[core]
    excludesfile = /Users/xyz/.gitignore_global
    editor = 'subl' --wait
[difftool "sourcetree"]
    cmd = opendiff \"$LOCAL\" \"$REMOTE\"
    path = 
[mergetool "sourcetree"]
    cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
    trustExitCode = true
[alias]
    lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&lt;%an&gt;%Creset' --abbrev-commit --date=relative
[color "diff"]
    old = red strike
    new = green italic
</code></pre>

<p>But now that I try to sign my commits using </p>

<pre><code>git commit -a -S -m "message"
</code></pre>

<p>I get to see the following error - </p>

<blockquote>
  <p>You need a passphrase to unlock the secret key for </p>
  
  <p>user: "XYZ (Digitally Signed) " </p>
  
  <p>2048-bit RSA key, ID AAAAAAAA, created 2016-07-01</p>
  
  <p>error: gpg failed to sign the data fatal: failed to write commit
  object</p>
</blockquote>

<p><strong><em>Note</em></strong> - I can still commit changes using <code>git commit -a -m "message"</code></p>

<p><strong><em>Is there a way to overcome the same? Or any change required in <code>gpg</code> configs to get along with the upgradation of git?</em></strong></p>

<hr>

<p><strong><em>Update 1</em></strong></p>

<p>Also seeking further usefulness, following <a href="https://stackoverflow.com/questions/10161198/is-there-a-way-to-autosign-commits-in-git-with-a-gpg-key">Is there a way to &quot;autosign&quot; commits in Git with a GPG key?</a>. I've already configured the key using </p>

<pre><code>git config --global user.signingkey ED5CDE14(with my key) 
git config --global commit.gpgsign true
</code></pre>

<p>and quite obviously getting the same error anyway.</p>